1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Merge remote-tracking branch 'origin/next' into

bsongis/vario_improvements

Conflicts:
	radio/src/maths.cpp
This commit is contained in:
Bertrand Songis 2014-02-21 07:13:33 +01:00
commit 903dc152a5
415 changed files with 48952 additions and 9887 deletions

View file

@ -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

View file

@ -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 )

View file

@ -981,177 +981,177 @@
<file>themes/monowhite/48/contributors.png</file>
<file>themes/monowhite/48/stop.png</file>
<file>themes/monowhite/48/write_eeprom.png</file>
<file>themes/new/16/paintbrush.png</file>
<file>themes/new/16/open.png</file>
<file>themes/new/16/edit.png</file>
<file>themes/new/16/information.png</file>
<file>themes/new/16/configure.png</file>
<file>themes/new/16/list.png</file>
<file>themes/new/16/wizard.png</file>
<file>themes/new/16/logs.png</file>
<file>themes/new/16/new.png</file>
<file>themes/new/16/save.png</file>
<file>themes/new/16/recentdocument.png</file>
<file>themes/new/16/simulate.png</file>
<file>themes/new/16/changelog.png</file>
<file>themes/new/16/copy.png</file>
<file>themes/new/16/write_flash.png</file>
<file>themes/new/16/read_eeprom_file.png</file>
<file>themes/new/16/clear.png</file>
<file>themes/new/16/play.png</file>
<file>themes/new/16/fuses.png</file>
<file>themes/new/16/arrow-right.png</file>
<file>themes/new/16/exit.png</file>
<file>themes/new/16/moveup.png</file>
<file>themes/new/16/read_eeprom.png</file>
<file>themes/new/16/cut.png</file>
<file>themes/new/16/arrow-left.png</file>
<file>themes/new/16/write_eeprom_file.png</file>
<file>themes/new/16/library.png</file>
<file>themes/new/16/profiles.png</file>
<file>themes/new/16/paste.png</file>
<file>themes/new/16/print.png</file>
<file>themes/new/16/compare.png</file>
<file>themes/new/16/saveas.png</file>
<file>themes/new/16/apppreferences.png</file>
<file>themes/new/16/fwpreferences.png</file>
<file>themes/new/16/movedown.png</file>
<file>themes/new/16/currentmodel.png</file>
<file>themes/new/16/read_flash.png</file>
<file>themes/new/16/duplicate.png</file>
<file>themes/new/16/add.png</file>
<file>themes/new/16/update.png</file>
<file>themes/new/16/contributors.png</file>
<file>themes/new/16/stop.png</file>
<file>themes/new/16/write_eeprom.png</file>
<file>themes/new/24/paintbrush.png</file>
<file>themes/new/24/open.png</file>
<file>themes/new/24/edit.png</file>
<file>themes/new/24/information.png</file>
<file>themes/new/24/configure.png</file>
<file>themes/new/24/list.png</file>
<file>themes/new/24/wizard.png</file>
<file>themes/new/24/logs.png</file>
<file>themes/new/24/new.png</file>
<file>themes/new/24/save.png</file>
<file>themes/new/24/recentdocument.png</file>
<file>themes/new/24/simulate.png</file>
<file>themes/new/24/changelog.png</file>
<file>themes/new/24/copy.png</file>
<file>themes/new/24/write_flash.png</file>
<file>themes/new/24/read_eeprom_file.png</file>
<file>themes/new/24/clear.png</file>
<file>themes/new/24/play.png</file>
<file>themes/new/24/fuses.png</file>
<file>themes/new/24/arrow-right.png</file>
<file>themes/new/24/exit.png</file>
<file>themes/new/24/moveup.png</file>
<file>themes/new/24/read_eeprom.png</file>
<file>themes/new/24/cut.png</file>
<file>themes/new/24/arrow-left.png</file>
<file>themes/new/24/write_eeprom_file.png</file>
<file>themes/new/24/library.png</file>
<file>themes/new/24/profiles.png</file>
<file>themes/new/24/paste.png</file>
<file>themes/new/24/print.png</file>
<file>themes/new/24/compare.png</file>
<file>themes/new/24/saveas.png</file>
<file>themes/new/24/apppreferences.png</file>
<file>themes/new/24/fwpreferences.png</file>
<file>themes/new/24/movedown.png</file>
<file>themes/new/24/currentmodel.png</file>
<file>themes/new/24/read_flash.png</file>
<file>themes/new/24/duplicate.png</file>
<file>themes/new/24/add.png</file>
<file>themes/new/24/update.png</file>
<file>themes/new/24/contributors.png</file>
<file>themes/new/24/stop.png</file>
<file>themes/new/24/write_eeprom.png</file>
<file>themes/new/32/paintbrush.png</file>
<file>themes/new/32/open.png</file>
<file>themes/new/32/edit.png</file>
<file>themes/new/32/information.png</file>
<file>themes/new/32/configure.png</file>
<file>themes/new/32/list.png</file>
<file>themes/new/32/wizard.png</file>
<file>themes/new/32/logs.png</file>
<file>themes/new/32/new.png</file>
<file>themes/new/32/save.png</file>
<file>themes/new/32/recentdocument.png</file>
<file>themes/new/32/simulate.png</file>
<file>themes/new/32/changelog.png</file>
<file>themes/new/32/copy.png</file>
<file>themes/new/32/write_flash.png</file>
<file>themes/new/32/read_eeprom_file.png</file>
<file>themes/new/32/clear.png</file>
<file>themes/new/32/play.png</file>
<file>themes/new/32/fuses.png</file>
<file>themes/new/32/arrow-right.png</file>
<file>themes/new/32/exit.png</file>
<file>themes/new/32/moveup.png</file>
<file>themes/new/32/read_eeprom.png</file>
<file>themes/new/32/cut.png</file>
<file>themes/new/32/arrow-left.png</file>
<file>themes/new/32/write_eeprom_file.png</file>
<file>themes/new/32/library.png</file>
<file>themes/new/32/profiles.png</file>
<file>themes/new/32/paste.png</file>
<file>themes/new/32/print.png</file>
<file>themes/new/32/compare.png</file>
<file>themes/new/32/saveas.png</file>
<file>themes/new/32/apppreferences.png</file>
<file>themes/new/32/fwpreferences.png</file>
<file>themes/new/32/movedown.png</file>
<file>themes/new/32/currentmodel.png</file>
<file>themes/new/32/read_flash.png</file>
<file>themes/new/32/duplicate.png</file>
<file>themes/new/32/add.png</file>
<file>themes/new/32/update.png</file>
<file>themes/new/32/contributors.png</file>
<file>themes/new/32/stop.png</file>
<file>themes/new/32/write_eeprom.png</file>
<file>themes/new/48/paintbrush.png</file>
<file>themes/new/48/open.png</file>
<file>themes/new/48/edit.png</file>
<file>themes/new/48/information.png</file>
<file>themes/new/48/configure.png</file>
<file>themes/new/48/list.png</file>
<file>themes/new/48/wizard.png</file>
<file>themes/new/48/logs.png</file>
<file>themes/new/48/new.png</file>
<file>themes/new/48/save.png</file>
<file>themes/new/48/recentdocument.png</file>
<file>themes/new/48/simulate.png</file>
<file>themes/new/48/changelog.png</file>
<file>themes/new/48/copy.png</file>
<file>themes/new/48/write_flash.png</file>
<file>themes/new/48/read_eeprom_file.png</file>
<file>themes/new/48/clear.png</file>
<file>themes/new/48/play.png</file>
<file>themes/new/48/fuses.png</file>
<file>themes/new/48/arrow-right.png</file>
<file>themes/new/48/exit.png</file>
<file>themes/new/48/moveup.png</file>
<file>themes/new/48/read_eeprom.png</file>
<file>themes/new/48/cut.png</file>
<file>themes/new/48/arrow-left.png</file>
<file>themes/new/48/write_eeprom_file.png</file>
<file>themes/new/48/library.png</file>
<file>themes/new/48/profiles.png</file>
<file>themes/new/48/paste.png</file>
<file>themes/new/48/print.png</file>
<file>themes/new/48/compare.png</file>
<file>themes/new/48/saveas.png</file>
<file>themes/new/48/apppreferences.png</file>
<file>themes/new/48/fwpreferences.png</file>
<file>themes/new/48/movedown.png</file>
<file>themes/new/48/currentmodel.png</file>
<file>themes/new/48/read_flash.png</file>
<file>themes/new/48/duplicate.png</file>
<file>themes/new/48/add.png</file>
<file>themes/new/48/update.png</file>
<file>themes/new/48/contributors.png</file>
<file>themes/new/48/stop.png</file>
<file>themes/new/48/write_eeprom.png</file>
<file>themes/yerico/16/paintbrush.png</file>
<file>themes/yerico/16/open.png</file>
<file>themes/yerico/16/edit.png</file>
<file>themes/yerico/16/information.png</file>
<file>themes/yerico/16/configure.png</file>
<file>themes/yerico/16/list.png</file>
<file>themes/yerico/16/wizard.png</file>
<file>themes/yerico/16/logs.png</file>
<file>themes/yerico/16/new.png</file>
<file>themes/yerico/16/save.png</file>
<file>themes/yerico/16/recentdocument.png</file>
<file>themes/yerico/16/simulate.png</file>
<file>themes/yerico/16/changelog.png</file>
<file>themes/yerico/16/copy.png</file>
<file>themes/yerico/16/write_flash.png</file>
<file>themes/yerico/16/read_eeprom_file.png</file>
<file>themes/yerico/16/clear.png</file>
<file>themes/yerico/16/play.png</file>
<file>themes/yerico/16/fuses.png</file>
<file>themes/yerico/16/arrow-right.png</file>
<file>themes/yerico/16/exit.png</file>
<file>themes/yerico/16/moveup.png</file>
<file>themes/yerico/16/read_eeprom.png</file>
<file>themes/yerico/16/cut.png</file>
<file>themes/yerico/16/arrow-left.png</file>
<file>themes/yerico/16/write_eeprom_file.png</file>
<file>themes/yerico/16/library.png</file>
<file>themes/yerico/16/profiles.png</file>
<file>themes/yerico/16/paste.png</file>
<file>themes/yerico/16/print.png</file>
<file>themes/yerico/16/compare.png</file>
<file>themes/yerico/16/saveas.png</file>
<file>themes/yerico/16/apppreferences.png</file>
<file>themes/yerico/16/fwpreferences.png</file>
<file>themes/yerico/16/movedown.png</file>
<file>themes/yerico/16/currentmodel.png</file>
<file>themes/yerico/16/read_flash.png</file>
<file>themes/yerico/16/duplicate.png</file>
<file>themes/yerico/16/add.png</file>
<file>themes/yerico/16/update.png</file>
<file>themes/yerico/16/contributors.png</file>
<file>themes/yerico/16/stop.png</file>
<file>themes/yerico/16/write_eeprom.png</file>
<file>themes/yerico/24/paintbrush.png</file>
<file>themes/yerico/24/open.png</file>
<file>themes/yerico/24/edit.png</file>
<file>themes/yerico/24/information.png</file>
<file>themes/yerico/24/configure.png</file>
<file>themes/yerico/24/list.png</file>
<file>themes/yerico/24/wizard.png</file>
<file>themes/yerico/24/logs.png</file>
<file>themes/yerico/24/new.png</file>
<file>themes/yerico/24/save.png</file>
<file>themes/yerico/24/recentdocument.png</file>
<file>themes/yerico/24/simulate.png</file>
<file>themes/yerico/24/changelog.png</file>
<file>themes/yerico/24/copy.png</file>
<file>themes/yerico/24/write_flash.png</file>
<file>themes/yerico/24/read_eeprom_file.png</file>
<file>themes/yerico/24/clear.png</file>
<file>themes/yerico/24/play.png</file>
<file>themes/yerico/24/fuses.png</file>
<file>themes/yerico/24/arrow-right.png</file>
<file>themes/yerico/24/exit.png</file>
<file>themes/yerico/24/moveup.png</file>
<file>themes/yerico/24/read_eeprom.png</file>
<file>themes/yerico/24/cut.png</file>
<file>themes/yerico/24/arrow-left.png</file>
<file>themes/yerico/24/write_eeprom_file.png</file>
<file>themes/yerico/24/library.png</file>
<file>themes/yerico/24/profiles.png</file>
<file>themes/yerico/24/paste.png</file>
<file>themes/yerico/24/print.png</file>
<file>themes/yerico/24/compare.png</file>
<file>themes/yerico/24/saveas.png</file>
<file>themes/yerico/24/apppreferences.png</file>
<file>themes/yerico/24/fwpreferences.png</file>
<file>themes/yerico/24/movedown.png</file>
<file>themes/yerico/24/currentmodel.png</file>
<file>themes/yerico/24/read_flash.png</file>
<file>themes/yerico/24/duplicate.png</file>
<file>themes/yerico/24/add.png</file>
<file>themes/yerico/24/update.png</file>
<file>themes/yerico/24/contributors.png</file>
<file>themes/yerico/24/stop.png</file>
<file>themes/yerico/24/write_eeprom.png</file>
<file>themes/yerico/32/paintbrush.png</file>
<file>themes/yerico/32/open.png</file>
<file>themes/yerico/32/edit.png</file>
<file>themes/yerico/32/information.png</file>
<file>themes/yerico/32/configure.png</file>
<file>themes/yerico/32/list.png</file>
<file>themes/yerico/32/wizard.png</file>
<file>themes/yerico/32/logs.png</file>
<file>themes/yerico/32/new.png</file>
<file>themes/yerico/32/save.png</file>
<file>themes/yerico/32/recentdocument.png</file>
<file>themes/yerico/32/simulate.png</file>
<file>themes/yerico/32/changelog.png</file>
<file>themes/yerico/32/copy.png</file>
<file>themes/yerico/32/write_flash.png</file>
<file>themes/yerico/32/read_eeprom_file.png</file>
<file>themes/yerico/32/clear.png</file>
<file>themes/yerico/32/play.png</file>
<file>themes/yerico/32/fuses.png</file>
<file>themes/yerico/32/arrow-right.png</file>
<file>themes/yerico/32/exit.png</file>
<file>themes/yerico/32/moveup.png</file>
<file>themes/yerico/32/read_eeprom.png</file>
<file>themes/yerico/32/cut.png</file>
<file>themes/yerico/32/arrow-left.png</file>
<file>themes/yerico/32/write_eeprom_file.png</file>
<file>themes/yerico/32/library.png</file>
<file>themes/yerico/32/profiles.png</file>
<file>themes/yerico/32/paste.png</file>
<file>themes/yerico/32/print.png</file>
<file>themes/yerico/32/compare.png</file>
<file>themes/yerico/32/saveas.png</file>
<file>themes/yerico/32/apppreferences.png</file>
<file>themes/yerico/32/fwpreferences.png</file>
<file>themes/yerico/32/movedown.png</file>
<file>themes/yerico/32/currentmodel.png</file>
<file>themes/yerico/32/read_flash.png</file>
<file>themes/yerico/32/duplicate.png</file>
<file>themes/yerico/32/add.png</file>
<file>themes/yerico/32/update.png</file>
<file>themes/yerico/32/contributors.png</file>
<file>themes/yerico/32/stop.png</file>
<file>themes/yerico/32/write_eeprom.png</file>
<file>themes/yerico/48/paintbrush.png</file>
<file>themes/yerico/48/open.png</file>
<file>themes/yerico/48/edit.png</file>
<file>themes/yerico/48/information.png</file>
<file>themes/yerico/48/configure.png</file>
<file>themes/yerico/48/list.png</file>
<file>themes/yerico/48/wizard.png</file>
<file>themes/yerico/48/logs.png</file>
<file>themes/yerico/48/new.png</file>
<file>themes/yerico/48/save.png</file>
<file>themes/yerico/48/recentdocument.png</file>
<file>themes/yerico/48/simulate.png</file>
<file>themes/yerico/48/changelog.png</file>
<file>themes/yerico/48/copy.png</file>
<file>themes/yerico/48/write_flash.png</file>
<file>themes/yerico/48/read_eeprom_file.png</file>
<file>themes/yerico/48/clear.png</file>
<file>themes/yerico/48/play.png</file>
<file>themes/yerico/48/fuses.png</file>
<file>themes/yerico/48/arrow-right.png</file>
<file>themes/yerico/48/exit.png</file>
<file>themes/yerico/48/moveup.png</file>
<file>themes/yerico/48/read_eeprom.png</file>
<file>themes/yerico/48/cut.png</file>
<file>themes/yerico/48/arrow-left.png</file>
<file>themes/yerico/48/write_eeprom_file.png</file>
<file>themes/yerico/48/library.png</file>
<file>themes/yerico/48/profiles.png</file>
<file>themes/yerico/48/paste.png</file>
<file>themes/yerico/48/print.png</file>
<file>themes/yerico/48/compare.png</file>
<file>themes/yerico/48/saveas.png</file>
<file>themes/yerico/48/apppreferences.png</file>
<file>themes/yerico/48/fwpreferences.png</file>
<file>themes/yerico/48/movedown.png</file>
<file>themes/yerico/48/currentmodel.png</file>
<file>themes/yerico/48/read_flash.png</file>
<file>themes/yerico/48/duplicate.png</file>
<file>themes/yerico/48/add.png</file>
<file>themes/yerico/48/update.png</file>
<file>themes/yerico/48/contributors.png</file>
<file>themes/yerico/48/stop.png</file>
<file>themes/yerico/48/write_eeprom.png</file>
</qresource>
</RCC>

View file

@ -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;

View file

@ -26,11 +26,7 @@
<bool>false</bool>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
<string>Compare Models</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">

View file

@ -1,6 +1,7 @@
#include "contributorsdialog.h"
#include "ui_contributorsdialog.h"
#include <QtGui>
#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("<html><head>");
@ -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*)));

View file

@ -13,10 +13,6 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextEdit" name="textEditor"/>

View file

@ -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"));

View file

@ -9,7 +9,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1086</width>
<width>1087</width>
<height>285</height>
</rect>
</property>
@ -22,10 +22,6 @@
<property name="windowTitle">
<string>Transmitter Splash Screen Editor</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>6</number>

View file

@ -2,13 +2,14 @@
#include "ui_downloaddialog.h"
#include <QMessageBox>
#include <QtGui>
#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);

View file

@ -13,10 +13,6 @@
<property name="windowTitle">
<string>Downloading: </string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QProgressBar" name="progressBar">

View file

@ -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<FirmwareInfo *> 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;

View file

@ -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) {

View file

@ -303,7 +303,7 @@ int Er9xInterface::isAvailable(Protocol prot, int port)
SimulatorInterface * Er9xInterface::getSimulator()
{
return new Er9xSimulator(this);
return NULL; // new Er9xSimulator(this);
}

View file

@ -343,7 +343,7 @@ int Ersky9xInterface::isAvailable(Protocol prot, int port)
SimulatorInterface * Ersky9xInterface::getSimulator()
{
return new Ersky9xSimulator(this);
return NULL; // new Ersky9xSimulator(this);
}

View file

@ -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<int>(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();

View file

@ -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

View file

@ -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<int>(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();

View file

@ -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

View file

@ -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<int>(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();

View file

@ -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

View file

@ -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<int>(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();

View file

@ -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

View file

@ -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

View file

@ -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 <class T>
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 <class T>
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<Open9xModelData_v201>(model, data, index, stickMode);
@ -247,7 +247,7 @@ bool Open9xInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data
}
template <class T>
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 <class T>
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 <class T>
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"));

View file

@ -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();

View file

@ -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();

View file

@ -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;
};

View file

@ -202,5 +202,5 @@ int Th9xInterface::isAvailable(Protocol proto, int port)
SimulatorInterface * Th9xInterface::getSimulator()
{
return new Th9xSimulator(this);
return NULL; // new Th9xSimulator(this);
}

View file

@ -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()

View file

@ -13,10 +13,6 @@
<property name="windowTitle">
<string>Fuses</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="readFuses">

View file

@ -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();

View file

@ -19,10 +19,6 @@
<property name="windowTitle">
<string>General Edit</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
@ -1559,10 +1555,10 @@ Acceptable values are 5v..10v</string>
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="verticalSpacing">
<property name="topMargin">
<number>0</number>
</property>
<property name="topMargin">
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="2">

View file

@ -1,5 +1,6 @@
#include <QtGui>
#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"));
}
}

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 312 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 307 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 329 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 429 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 400 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 959 KiB

View file

@ -1,6 +1,7 @@
#include "logsdialog.h"
#include "ui_logsdialog.h"
#include "qcustomplot.h"
#include "helpers.h"
#if defined WIN32 || !defined __GNUC__
#include <windows.h>
#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++)

View file

@ -13,10 +13,6 @@
<property name="windowTitle">
<string>Companion Log Viewer</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
@ -70,7 +66,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@ -188,7 +193,7 @@
<number>0</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>true</bool>
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>18</number>

View file

@ -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("<br/><br/>");
aboutStr.append(tr("Copyright") + " Bertrand Songis & Romolo Manfredini<br/>&copy; 2011-2014<br/>");
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;

View file

@ -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;

View file

@ -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)

View file

@ -13,10 +13,6 @@
<property name="windowTitle">
<string/>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="ModelsListWidget" name="modelsList"/>

View file

@ -3,7 +3,10 @@
#include "helpers.h"
#include "eeprominterface.h"
#include <QtGui>
#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";

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>773</width>
<height>591</height>
<width>793</width>
<height>599</height>
</rect>
</property>
<property name="sizePolicy">
@ -25,10 +25,6 @@
<property name="windowTitle">
<string>Model Configuration Wizard</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,1" columnstretch="0,0,1,1,1,1">
<item row="3" column="2">
<widget class="QLabel" name="engine_Label">

View file

@ -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;
}

View file

@ -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;

View file

@ -25,10 +25,6 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="textEdit">

View file

@ -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})

Some files were not shown because too many files have changed in this diff Show more