mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 06:15:10 +03:00
Visual C++ compilation
This commit is contained in:
parent
2f8f2df3c7
commit
b2db04f4bb
17 changed files with 37 additions and 69 deletions
|
@ -335,7 +335,7 @@ IF( WIN32 )
|
|||
ENDIF( )
|
||||
|
||||
SET( SYSDIR "$ENV{windir}/system32" )
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../winbuild/${NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion9x.nsi @ONLY)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion9x.nsi @ONLY)
|
||||
|
||||
FIND_PROGRAM(NSIS_EXE makensis.exe PATHS
|
||||
"C:/Program Files/NSIS"
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
#include <iostream>
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#else
|
||||
#include "../winbuild/winbuild.h"
|
||||
#include "../targets/windows/winbuild.h"
|
||||
#endif
|
||||
|
||||
#define EESIZE_STOCK 2048
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
#ifndef file_h
|
||||
#define file_h
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#else
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include "eeprominterface.h"
|
||||
|
||||
#define ERR_NONE 0
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#define NUM_POTS 3
|
||||
#define SWSRC_SW1 DSW_SW1
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Er9x {
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Ersky9x {
|
||||
|
|
|
@ -53,10 +53,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9xGruvin9x {
|
||||
|
|
|
@ -52,10 +52,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9xM128 {
|
||||
|
|
|
@ -58,10 +58,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9xSky9x {
|
||||
|
|
|
@ -56,10 +56,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9x {
|
||||
|
|
|
@ -52,10 +52,6 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9xX9D {
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#define NUM_CSW 12
|
||||
#define SWSRC_SW1 10
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include "../winbuild/winbuild.h"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;Include Modern UI
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\FileAssociation.nsh"
|
||||
!include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh"
|
||||
|
||||
;--------------------------------
|
||||
;General
|
||||
|
@ -41,7 +41,7 @@
|
|||
;--------------------------------
|
||||
;Pages
|
||||
|
||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\license.txt"
|
||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
|
@ -80,7 +80,7 @@ Section "companion9x" SecDummy
|
|||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\license.txt"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
||||
File "companion9x.exe"
|
||||
File "C:\Programs\xerces\src\.libs\libxerces-c-3-1.dll"
|
||||
File "C:\MinGW\bin\libgcc_s_dw2-1.dll"
|
||||
|
@ -91,10 +91,10 @@ Section "companion9x" SecDummy
|
|||
File "@QT_BINARY_DIR@\QtXml4.dll"
|
||||
File "@QT_BINARY_DIR@\QtNetwork4.dll"
|
||||
File "@QT_BINARY_DIR@\Phonon4.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\avrdude.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\avrdude.conf"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\libusb0.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\dfu-util.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
|
||||
|
||||
CreateDirectory "$INSTDIR\lang"
|
||||
SetOutPath "$INSTDIR\lang"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;Include Modern UI
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\FileAssociation.nsh"
|
||||
!include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh"
|
||||
|
||||
;--------------------------------
|
||||
;General
|
||||
|
@ -60,7 +60,7 @@
|
|||
;--------------------------------
|
||||
;Pages
|
||||
|
||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\license.txt"
|
||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
|
@ -99,7 +99,7 @@ Section "companion9x" SecDummy
|
|||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\license.txt"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
||||
File "Release\companion9x.exe"
|
||||
${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
||||
!ifdef PTHREAD_WINDIR
|
||||
|
@ -116,11 +116,11 @@ Section "companion9x" SecDummy
|
|||
File "@QT_BINARY_DIR@\QtNetwork4.dll"
|
||||
File "@QT_BINARY_DIR@\Phonon4.dll"
|
||||
File "@QT_BINARY_DIR@\QtXml4.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\avrdude.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\avrdude.conf"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\libusb0.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\dfu-util.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\winbuild\libusb-1.0.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
|
||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb-1.0.dll"
|
||||
|
||||
CreateDirectory "$INSTDIR\lang"
|
||||
SetOutPath "$INSTDIR\lang"
|
||||
|
|
|
@ -48,6 +48,12 @@ PACK(typedef struct {
|
|||
int8_t curveParam;
|
||||
}) ExpoData_v215;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define LIMITDATA_V215_EXTRA char name[LEN_CHANNEL_NAME];
|
||||
#else
|
||||
#define LIMITDATA_V215_EXTRA
|
||||
#endif
|
||||
|
||||
PACK(typedef struct {
|
||||
int8_t min;
|
||||
int8_t max;
|
||||
|
@ -55,9 +61,7 @@ PACK(typedef struct {
|
|||
int16_t offset:14;
|
||||
uint16_t symetrical:1;
|
||||
uint16_t revert:1;
|
||||
#if defined(PCBTARANIS)
|
||||
char name[LEN_CHANNEL_NAME];
|
||||
#endif
|
||||
LIMITDATA_V215_EXTRA
|
||||
}) LimitData_v215;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
|
@ -462,7 +466,7 @@ bool eeConvert()
|
|||
theFile.openRlc(0);
|
||||
theFile.readRlc((uint8_t*)&g_eeGeneral, sizeof(g_eeGeneral));
|
||||
#else
|
||||
#warning "TODO openRlc for sky9x"
|
||||
#pragma message("TODO openRlc for sky9x")
|
||||
#endif
|
||||
if (g_eeGeneral.version == 215) ConvertGeneralSettings_215_to_216(g_eeGeneral);
|
||||
s_eeDirtyMsk = EE_GENERAL;
|
||||
|
@ -482,7 +486,7 @@ bool eeConvert()
|
|||
theFile.openRlc(FILE_MODEL(id));
|
||||
theFile.readRlc((uint8_t*)&g_model, sizeof(g_model));
|
||||
#else
|
||||
#warning "TODO openRlc for sky9x"
|
||||
#pragma message("TODO openRlc for sky9x")
|
||||
#endif
|
||||
int version = conversionVersionStart;
|
||||
if (version == 215) {
|
||||
|
|
|
@ -3934,7 +3934,7 @@ void menuModelLimits(uint8_t event)
|
|||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
case ITEM_LIMITS_PPM_CENTER:
|
||||
lcd_outdezAtt(LIMITS_PPM_CENTER_POS, y, PPM_CENTER+ld->ppmCenter, attr);
|
||||
#warning "could be less restrictive!"
|
||||
#pragma message("could be less restrictive!")
|
||||
if (active && ld->max <= 0 && ld->min >= 0) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->ppmCenter, -125, +125);
|
||||
}
|
||||
|
|
|
@ -770,7 +770,7 @@ PACK(typedef struct t_CustomFnData { // Function Switches data
|
|||
#define CFN_CH_NUMBER(p) (CFN_FUNC(p))
|
||||
#define CFN_PLAY_REPEAT(p) ((p)->active)
|
||||
#define CFN_PLAY_REPEAT_MUL 1
|
||||
#define CFN_PLAY_REPEAT_NOSTART 0b111111
|
||||
#define CFN_PLAY_REPEAT_NOSTART 0x3F
|
||||
#define CFN_GVAR_MODE(p) ((p)->mode)
|
||||
#define CFN_PARAM(p) ((p)->param.composite.val)
|
||||
#define CFN_RESET(p) (p->active = 0, memset(&(p)->param, 0, sizeof((p)->param)))
|
||||
|
@ -1411,6 +1411,12 @@ PACK(typedef struct t_ModelHeader {
|
|||
MODELDATA_BITMAP
|
||||
}) ModelHeader;
|
||||
|
||||
#if defined (CPUARM)
|
||||
#define ARM_OR_AVR(x, y) x
|
||||
#else
|
||||
#define ARM_OR_AVR(x, y) y
|
||||
#endif
|
||||
|
||||
PACK(typedef struct t_ModelData {
|
||||
ModelHeader header;
|
||||
TimerData timers[MAX_TIMERS];
|
||||
|
@ -1419,11 +1425,7 @@ PACK(typedef struct t_ModelData {
|
|||
int8_t ppmNCH:4; /* spare on ARM */
|
||||
uint8_t trimInc:3; // Trim Increments
|
||||
uint8_t disableThrottleWarning:1;
|
||||
#if defined (CPUARM)
|
||||
uint8_t displayText:1;
|
||||
#else
|
||||
uint8_t pulsePol:1; /* unused on ARM */
|
||||
#endif
|
||||
uint8_t ARM_OR_AVR(displayText, pulsePol):1;
|
||||
uint8_t extendedLimits:1;
|
||||
uint8_t extendedTrims:1;
|
||||
uint8_t throttleReversed:1;
|
||||
|
|
|
@ -204,7 +204,7 @@ void applyTemplate(uint8_t idx)
|
|||
case TMPL_ELEVON_DELTA:
|
||||
defaultInputs();
|
||||
#if defined(PCBTARANIS)
|
||||
#warning "Templates below are not implemented (only V-TAIL has been done). Feel free to help!"
|
||||
#pragma message("Templates below are not implemented (only V-TAIL has been done). Feel free to help!")
|
||||
#endif
|
||||
setDest(ICC(STK_ELE), MIXSRC_Ele, true);
|
||||
setDest(ICC(STK_ELE), MIXSRC_Ail);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue