Fixes for VC++ Companion compilation
This commit is contained in:
@@ -86,6 +86,7 @@ inline int geteepromsize() {
|
|||||||
#include "radio/src/eeprom_conversions.cpp"
|
#include "radio/src/eeprom_conversions.cpp"
|
||||||
#include "radio/src/eeprom_rlc.cpp"
|
#include "radio/src/eeprom_rlc.cpp"
|
||||||
#include "radio/src/opentx.cpp"
|
#include "radio/src/opentx.cpp"
|
||||||
|
|
||||||
// #include "radio/src/debug.cpp" // only included once in Taranis simulator because functions are exported as C and don't support namespaces
|
// #include "radio/src/debug.cpp" // only included once in Taranis simulator because functions are exported as C and don't support namespaces
|
||||||
#include "radio/src/main_arm.cpp"
|
#include "radio/src/main_arm.cpp"
|
||||||
#include "radio/src/strhelpers.cpp"
|
#include "radio/src/strhelpers.cpp"
|
||||||
@@ -160,6 +161,7 @@ inline int geteepromsize() {
|
|||||||
#include "radio/src/telemetry/frsky_d.cpp"
|
#include "radio/src/telemetry/frsky_d.cpp"
|
||||||
#include "radio/src/targets/taranis/audio_driver.cpp"
|
#include "radio/src/targets/taranis/audio_driver.cpp"
|
||||||
#include "radio/src/targets/taranis/telemetry_driver.cpp"
|
#include "radio/src/targets/taranis/telemetry_driver.cpp"
|
||||||
|
#include "radio/src/targets/taranis/top_lcd_driver.cpp"
|
||||||
#include "radio/src/audio_arm.cpp"
|
#include "radio/src/audio_arm.cpp"
|
||||||
#include "radio/src/translations/tts_cz.cpp"
|
#include "radio/src/translations/tts_cz.cpp"
|
||||||
#include "radio/src/translations/tts_de.cpp"
|
#include "radio/src/translations/tts_de.cpp"
|
||||||
@@ -226,6 +228,10 @@ void resetTrims()
|
|||||||
GPIOC->IDR |= PIN_TRIM_RV_DN | PIN_TRIM_RV_UP | PIN_TRIM_RH_L | PIN_TRIM_RH_R;
|
GPIOC->IDR |= PIN_TRIM_RV_DN | PIN_TRIM_RV_UP | PIN_TRIM_RH_L | PIN_TRIM_RH_R;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void delay_01us(::uint16_t nb)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace Open9xX9E;
|
using namespace Open9xX9E;
|
||||||
@@ -247,7 +253,7 @@ bool OpentxTaranisX9ESimulator::timer10ms()
|
|||||||
#include "simulatorimport.h"
|
#include "simulatorimport.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t * OpentxTaranisX9ESimulator::getLcd()
|
::uint8_t * OpentxTaranisX9ESimulator::getLcd()
|
||||||
{
|
{
|
||||||
#define GETLCD_IMPORT
|
#define GETLCD_IMPORT
|
||||||
#include "simulatorimport.h"
|
#include "simulatorimport.h"
|
||||||
@@ -294,27 +300,27 @@ void OpentxTaranisX9ESimulator::setValues(TxInputs &inputs)
|
|||||||
void OpentxTaranisX9ESimulator::setTrim(unsigned int idx, int value)
|
void OpentxTaranisX9ESimulator::setTrim(unsigned int idx, int value)
|
||||||
{
|
{
|
||||||
idx = Open9xX9E::modn12x3[4*getStickMode() + idx];
|
idx = Open9xX9E::modn12x3[4*getStickMode() + idx];
|
||||||
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
|
::uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
|
||||||
setTrimValue(phase, idx, value);
|
setTrimValue(phase, idx, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpentxTaranisX9ESimulator::getTrims(Trims & trims)
|
void OpentxTaranisX9ESimulator::getTrims(Trims & trims)
|
||||||
{
|
{
|
||||||
uint8_t phase = getFlightMode();
|
::uint8_t phase = getFlightMode();
|
||||||
trims.extended = hasExtendedTrims();
|
trims.extended = hasExtendedTrims();
|
||||||
for (uint8_t idx=0; idx<4; idx++) {
|
for (::uint8_t idx=0; idx<4; idx++) {
|
||||||
trims.values[idx] = getTrimValue(getTrimFlightPhase(phase, idx), idx);
|
trims.values[idx] = getTrimValue(getTrimFlightPhase(phase, idx), idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<2; i++) {
|
for (int i=0; i<2; i++) {
|
||||||
uint8_t idx = Open9xX9E::modn12x3[4*getStickMode() + i];
|
::uint8_t idx = Open9xX9E::modn12x3[4*getStickMode() + i];
|
||||||
int16_t tmp = trims.values[i];
|
::int16_t tmp = trims.values[i];
|
||||||
trims.values[i] = trims.values[idx];
|
trims.values[i] = trims.values[idx];
|
||||||
trims.values[idx] = tmp;
|
trims.values[idx] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpentxTaranisX9ESimulator::wheelEvent(uint8_t steps)
|
void OpentxTaranisX9ESimulator::wheelEvent(::uint8_t steps)
|
||||||
{
|
{
|
||||||
if (steps == 255)
|
if (steps == 255)
|
||||||
x9de_rotenc -= 2;
|
x9de_rotenc -= 2;
|
||||||
@@ -340,12 +346,12 @@ const char * OpentxTaranisX9ESimulator::getError()
|
|||||||
#include "simulatorimport.h"
|
#include "simulatorimport.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpentxTaranisX9ESimulator::sendTelemetry(uint8_t * data, unsigned int len)
|
void OpentxTaranisX9ESimulator::sendTelemetry(::uint8_t * data, unsigned int len)
|
||||||
{
|
{
|
||||||
processSportPacket(data);
|
processSportPacket(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpentxTaranisX9ESimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
|
void OpentxTaranisX9ESimulator::setTrainerInput(unsigned int inputNumber, ::int16_t value)
|
||||||
{
|
{
|
||||||
#define SETTRAINER_IMPORT
|
#define SETTRAINER_IMPORT
|
||||||
#include "simulatorimport.h"
|
#include "simulatorimport.h"
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ return true;
|
|||||||
|
|
||||||
#ifdef GETLCD_IMPORT
|
#ifdef GETLCD_IMPORT
|
||||||
#undef GETLCD_IMPORT
|
#undef GETLCD_IMPORT
|
||||||
return (uint8_t *)lcd_buf;
|
return (::uint8_t *)lcd_buf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GETERROR_IMPORT
|
#ifdef GETERROR_IMPORT
|
||||||
|
|||||||
+2
@@ -1671,7 +1671,9 @@ typedef struct
|
|||||||
#define GPIOI ((GPIO_TypeDef *) GPIOI_BASE)
|
#define GPIOI ((GPIO_TypeDef *) GPIOI_BASE)
|
||||||
#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE)
|
#define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE)
|
||||||
#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE)
|
#define GPIOK ((GPIO_TypeDef *) GPIOK_BASE)
|
||||||
|
#if !defined WIN32 && defined __GNUC__
|
||||||
#define CRC ((CRC_TypeDef *) CRC_BASE)
|
#define CRC ((CRC_TypeDef *) CRC_BASE)
|
||||||
|
#endif
|
||||||
#define RCC ((RCC_TypeDef *) RCC_BASE)
|
#define RCC ((RCC_TypeDef *) RCC_BASE)
|
||||||
#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE)
|
#define FLASH ((FLASH_TypeDef *) FLASH_R_BASE)
|
||||||
#define DMA1 ((DMA_TypeDef *) DMA1_BASE)
|
#define DMA1 ((DMA_TypeDef *) DMA1_BASE)
|
||||||
|
|||||||
+5
@@ -100,6 +100,11 @@
|
|||||||
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
|
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
|
||||||
#define __STATIC_INLINE static inline
|
#define __STATIC_INLINE static inline
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define __ASM __asm /*!< asm keyword for TASKING Compiler */
|
||||||
|
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
|
||||||
|
#define __STATIC_INLINE static inline
|
||||||
|
#define __DSB()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** __FPU_USED indicates whether an FPU is used or not. For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
/** __FPU_USED indicates whether an FPU is used or not. For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
||||||
|
|||||||
Reference in New Issue
Block a user