Merge branch 'next' into kilrah/FAS_Offset_compensation

Conflicts:
	companion/src/modeledit/telemetry.cpp
This commit is contained in:
Bertrand Songis
2014-01-23 16:31:09 +01:00
1155 changed files with 5305 additions and 2209 deletions
+31 -31
View File
@@ -260,7 +260,7 @@ MENUS_LOCK == NO
SHELL = sh
IMG2LBM = -python ../util/img2lbm.py
TRANSLATE = -python ../util/translate.py
SVNREV = $(shell sh -c "svnversion | egrep -o '[[:digit:]]+[[:alpha:]]*$$'")
VERSION = 2.0
SRC =
CPPSRC =
@@ -1071,43 +1071,43 @@ stamp_header:
@echo "//Automatically generated file (Makefile) - do not edit" > stamp-opentx.h
@echo "#define DATE_STR \"`date +%Y-%m-%d | tr -d '\r\n'`\"" >> stamp-opentx.h
@echo "#define TIME_STR \"`date +%H:%M:%S | tr -d '\r\n'`\"" >> stamp-opentx.h
@echo "#define SVN_STR \"opentx-r$(SVNREV)\"" >> stamp-opentx.h
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx.h
@cat stamp-opentx.h
stock-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock.txt
@cat stamp-opentx-stock.txt
9x-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x.txt
@cat stamp-opentx-9x.txt
stock128-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock128.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock128.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock128.txt
@cat stamp-opentx-stock128.txt
9x128-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x128.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x128.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x128.txt
@cat stamp-opentx-9x128.txt
stock2561-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock2561.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock2561.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock2561.txt
@cat stamp-opentx-stock2561.txt
9x2561-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x2561.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x2561.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x2561.txt
@cat stamp-opentx-9x2561.txt
v4-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-v4.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-v4.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-v4.txt
@cat stamp-opentx-v4.txt
gruvin9x-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-gruvin9x.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-gruvin9x.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-gruvin9x.txt
@cat stamp-opentx-9x.txt
arm-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-arm.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-arm.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-arm.txt
@cat stamp-opentx-arm.txt
sky9x-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-sky9x.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-sky9x.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-sky9x.txt
@cat stamp-opentx-sky9x.txt
taranis-stamp:
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-taranis.txt
@echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-taranis.txt
@echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-taranis.txt
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-taranis.txt
@cat stamp-opentx-taranis.txt
translations/cz.h: translations/cz.h.txt
@@ -1371,11 +1371,11 @@ GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS)
# conservative and not optimized. This is fine as Google Test
# compiles fast and for ordinary users its source rarely changes.
gtest-all.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -c \
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GTEST_DIR)/include -c \
$(GTEST_DIR)/src/gtest-all.cc
gtest_main.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -c \
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GTEST_DIR)/include -c \
$(GTEST_DIR)/src/gtest_main.cc
gtest.a : gtest-all.o
@@ -1389,4 +1389,4 @@ gtest_main.a : gtest-all.o gtest_main.o
# function.
gtests: $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp *.h gtest_main.a
g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp -I$(GTEST_DIR) -o gtests -lpthread -MD -DSIMU gtest_main.a
g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp -I$(GTEST_DIR) ${INCFLAGS} -I$(GTEST_DIR)/include -o gtests -lpthread -MD -DSIMU gtest_main.a
+1 -1
View File
@@ -3746,7 +3746,7 @@ enum LimitsItems {
#undef MIN_MAX_ATTR
#define MIN_MAX_ATTR attr
#else
#define MIN_MAX_DISPLAY(x) (x)
#define MIN_MAX_DISPLAY(x) ((int8_t)(x))
#endif
#if defined(PCBTARANIS)
+16 -6
View File
@@ -509,6 +509,12 @@ uint16_t evalChkSum()
return sum;
}
#if defined(TEMPLATES)
inline void applyDefaultTemplate()
{
applyTemplate(TMPL_SIMPLE_4CH);
}
#else
void applyDefaultTemplate()
{
for (int i=0; i<NUM_STICKS; i++) {
@@ -539,6 +545,7 @@ void applyDefaultTemplate()
}
eeDirty(EE_MODEL);
}
#endif
#if defined(PXX) && defined(CPUARM)
void checkModelIdUnique(uint8_t id)
@@ -3403,6 +3410,8 @@ void perOut(uint8_t mode, uint8_t tick10ms)
if (md->srcRaw == 0) break;
uint8_t stickIndex = md->srcRaw - MIXSRC_Rud;
if (!(dirtyChannels & ((bitfield_channels_t)1 << md->destCh))) continue;
// if this is the first calculation for the destination channel, initialize it with 0 (otherwise would be random)
@@ -3415,7 +3424,6 @@ void perOut(uint8_t mode, uint8_t tick10ms)
delayval_t mixEnabled = !(md->phases & (1 << s_perout_flight_phase)) && getSwitch(md->swtch);
//========== VALUE ===============
uint8_t stickIndex = md->srcRaw - MIXSRC_Rud;
getvalue_t v = 0;
if (mode > e_perout_mode_inactive_phase) {
if (!mixEnabled || stickIndex >= NUM_STICKS || (stickIndex == THR_STICK && g_model.thrTrim)) {
@@ -3433,12 +3441,14 @@ void perOut(uint8_t mode, uint8_t tick10ms)
else
#endif
{
v = getValue(md->srcRaw);
if (md->srcRaw>=MIXSRC_CH1 && md->srcRaw<=MIXSRC_LAST_CH && md->destCh != md->srcRaw-MIXSRC_CH1) {
if (dirtyChannels & ((bitfield_channels_t)1 << (md->srcRaw-MIXSRC_CH1)) & (passDirtyChannels|~(((bitfield_channels_t) 1 << md->destCh)-1)))
int8_t srcRaw = MIXSRC_Rud + stickIndex;
v = getValue(srcRaw);
srcRaw -= MIXSRC_CH1;
if (srcRaw>=0 && srcRaw<=MIXSRC_LAST_CH-MIXSRC_CH1 && md->destCh != srcRaw) {
if (dirtyChannels & ((bitfield_channels_t)1 << srcRaw) & (passDirtyChannels|~(((bitfield_channels_t) 1 << md->destCh)-1)))
passDirtyChannels |= (bitfield_channels_t) 1 << md->destCh;
if (md->srcRaw-MIXSRC_CH1 < md->destCh || pass > 0)
v = chans[md->srcRaw-MIXSRC_CH1] >> 8;
if (srcRaw < md->destCh || pass > 0)
v = chans[srcRaw] >> 8;
}
}
if (!mixCondition) {
+2
View File
@@ -359,6 +359,8 @@ void eeprom_read_block (void *pointer_ram, const void *pointer_eeprom, size_t si
#define boardInit()
#define OS_MutexID pthread_mutex_t
extern OS_MutexID audioMutex;
#define OS_FlagID int
#define OS_TID int
#define OS_TCID int
+1 -1
View File
@@ -40,7 +40,7 @@
#define STR2(s) #s
#define DEFNUMSTR(s) STR2(s)
const pm_char stamp1[] PROGMEM = " SVN: " SVN_STR;
const pm_char stamp1[] PROGMEM = "VERS: " VERS_STR;
const pm_char stamp2[] PROGMEM = "DATE: " DATE_STR;
const pm_char stamp3[] PROGMEM = "TIME: " TIME_STR;
#if defined(PCBSTD)
@@ -3,7 +3,7 @@
* @file system_stm32f2xx.c
* @author MCD Application Team
* @version V1.1.0
* @date 09-January-2013
* @date 05-January-2014
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
* This file contains the system clock configuration for STM32F2xx devices,
* and is generated by the clock configuration tool
@@ -46,15 +46,15 @@
*-----------------------------------------------------------------------------
* System Clock source | PLL (HSE)
*-----------------------------------------------------------------------------
* SYSCLK(Hz) | 60000000
* SYSCLK(Hz) | 120000000
*-----------------------------------------------------------------------------
* HCLK(Hz) | 60000000
* HCLK(Hz) | 120000000
*-----------------------------------------------------------------------------
* AHB Prescaler | 1
*-----------------------------------------------------------------------------
* APB1 Prescaler | 2
* APB1 Prescaler | 4
*-----------------------------------------------------------------------------
* APB2 Prescaler | 1
* APB2 Prescaler | 2
*-----------------------------------------------------------------------------
* HSE Frequency(Hz) | 12000000
*-----------------------------------------------------------------------------
@@ -62,7 +62,7 @@
*-----------------------------------------------------------------------------
* PLL_N | 240
*-----------------------------------------------------------------------------
* PLL_P | 4
* PLL_P | 2
*-----------------------------------------------------------------------------
* PLL_Q | 5
*-----------------------------------------------------------------------------
@@ -74,7 +74,7 @@
*-----------------------------------------------------------------------------
* VDD(V) | 3.3
*-----------------------------------------------------------------------------
* Flash Latency(WS) | 2
* Flash Latency(WS) | 3
*-----------------------------------------------------------------------------
* Prefetch Buffer | ON
*-----------------------------------------------------------------------------
@@ -146,7 +146,7 @@
#define PLL_N 240
/* SYSCLK = PLL_VCO / PLL_P */
#define PLL_P 4
#define PLL_P 2
/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */
#define PLL_Q 5
@@ -167,7 +167,7 @@
* @{
*/
uint32_t SystemCoreClock = 60000000;
uint32_t SystemCoreClock = 120000000;
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
@@ -359,11 +359,11 @@ static void SetSysClock(void)
/* HCLK = SYSCLK / 1*/
RCC->CFGR |= RCC_CFGR_HPRE_DIV1;
/* PCLK2 = HCLK / 1*/
RCC->CFGR |= RCC_CFGR_PPRE2_DIV1;
/* PCLK2 = HCLK / 2*/
RCC->CFGR |= RCC_CFGR_PPRE2_DIV2;
/* PCLK1 = HCLK / 2*/
RCC->CFGR |= RCC_CFGR_PPRE1_DIV2;
/* PCLK1 = HCLK / 4*/
RCC->CFGR |= RCC_CFGR_PPRE1_DIV4;
/* Configure the main PLL */
RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) |
@@ -378,7 +378,7 @@ static void SetSysClock(void)
}
/* Configure Flash prefetch, Instruction cache, Data cache and wait state */
FLASH->ACR = FLASH_ACR_PRFTEN |FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_2WS;
FLASH->ACR = FLASH_ACR_PRFTEN |FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_3WS;
/* Select the main PLL as system clock source */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
+1 -1
View File
@@ -60,7 +60,7 @@ extern "C" {
#define PERI1_FREQUENCY 30000000
#define PERI2_FREQUENCY 60000000
#define TIMER_MULT_APB1 2
#define TIMER_MULT_APB2 1
#define TIMER_MULT_APB2 2
#define JACK_PPM_OUT()
#define JACK_PPM_IN()
+52 -53
View File
@@ -113,7 +113,7 @@ void MAVLINK_reset(uint8_t warm_reset) {
memset(&telemetry_data, 0, sizeof(telemetry_data));
telemetry_data.rcv_control_mode = ERROR_NUM_MODES;
telemetry_data.req_mode = ERROR_NUM_MODES;
telemetry_data.type = MAV_TYPE_ENUM_END;
telemetry_data.autopilot = MAV_AUTOPILOT_ENUM_END;
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
@@ -139,7 +139,7 @@ void MAVLINK_Init(void) {
* characters are used. To get the full message you can use the commented
* funtion below.
*/
static inline void REC_MAVLINK_MSG_ID_STATUSTEXT(const mavlink_message_t* msg) {
_MAV_RETURN_char_array(msg, mav_statustext, LEN_STATUSTEXT, 1);
}
@@ -152,7 +152,7 @@ static inline void REC_MAVLINK_MSG_ID_STATUSTEXT(const mavlink_message_t* msg) {
* \todo Add battery remaining variable in telemetry_data struct for estimated
* remaining battery. Decoding funtion allready in place.
*/
static inline void REC_MAVLINK_MSG_ID_SYS_STATUS(const mavlink_message_t* msg) {
telemetry_data.vbat = mavlink_msg_sys_status_get_voltage_battery(msg) / 100; // Voltage * 10
telemetry_data.ibat = mavlink_msg_sys_status_get_current_battery(msg) / 10;
@@ -204,48 +204,48 @@ static inline void REC_MAVLINK_MSG_ID_VFR_HUD(const mavlink_message_t* msg) {
/*! \brief Heartbeat message
* \details Heartbeat message is used for the following information:
* type and autopilot is used to determain if the UAV is a ArduPlane or Arducopter
* type and autopilot is used to determine if the UAV is an ArduPlane or Arducopter
*/
static inline void REC_MAVLINK_MSG_ID_HEARTBEAT(const mavlink_message_t* msg) {
static inline void REC_MAVLINK_MSG_ID_HEARTBEAT(const mavlink_message_t* msg) {
telemetry_data.mode = mavlink_msg_heartbeat_get_base_mode(msg);
telemetry_data.custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
telemetry_data.custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
telemetry_data.status = mavlink_msg_heartbeat_get_system_status(msg);
telemetry_data.mav_sysid = msg->sysid;
telemetry_data.mav_compid = msg->compid;
uint8_t type = mavlink_msg_heartbeat_get_type(msg);
uint8_t autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
if ((type != telemetry_data.type) || (autopilot != telemetry_data.autopilot))
{
if (type != telemetry_data.type || autopilot != telemetry_data.autopilot) {
telemetry_data.type = mavlink_msg_heartbeat_get_type(msg);
telemetry_data.autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA)
{
if ((type == MAV_TYPE_QUADROTOR) ||
(type == MAV_TYPE_COAXIAL) ||
(type == MAV_TYPE_HELICOPTER) ||
(type == MAV_TYPE_HEXAROTOR) ||
(type == MAV_TYPE_OCTOROTOR) ||
(type == MAV_TYPE_TRICOPTER))
{
telemetry_data.type_autopilot = MAVLINK_ARDUCOPTER;
}
else if (type == MAV_TYPE_FIXED_WING)
{
telemetry_data.type_autopilot = MAVLINK_ARDUPLANE;
}
else
if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) {
if (type == MAV_TYPE_QUADROTOR ||
type == MAV_TYPE_COAXIAL ||
type == MAV_TYPE_HELICOPTER ||
type == MAV_TYPE_HEXAROTOR ||
type == MAV_TYPE_OCTOROTOR ||
type == MAV_TYPE_TRICOPTER) {
telemetry_data.type_autopilot = MAVLINK_ARDUCOPTER;
}
else if (type == MAV_TYPE_FIXED_WING) {
telemetry_data.type_autopilot = MAVLINK_ARDUPLANE;
}
else {
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
}
}
else
else {
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
}
}
telemetry_data.active = (telemetry_data.mode & MAV_MODE_FLAG_SAFETY_ARMED) ? true : false;
telemetry_data.active = (telemetry_data.mode & MAV_MODE_FLAG_SAFETY_ARMED) ? true : false;
mav_heartbeat = 3; // 450ms display '*'
mav_heartbeat_recv = 1;
}
static inline void REC_MAVLINK_MSG_ID_HIL_CONTROLS(const mavlink_message_t* msg) {
telemetry_data.nav_mode = mavlink_msg_hil_controls_get_mode(msg);
}
/*! \brief Process GPS raw intger message
* \details This message contains the following data:
* - fix type: 0-1: no fix, 2: 2D fix, 3: 3D fix.
@@ -257,7 +257,7 @@ static inline void REC_MAVLINK_MSG_ID_HIL_CONTROLS(const mavlink_message_t* msg)
*/
static inline void REC_MAVLINK_MSG_ID_GPS_RAW_INT(const mavlink_message_t* msg) {
telemetry_data.fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
telemetry_data.loc_current.lat = mavlink_msg_gps_raw_int_get_lat(msg) / 1E7;
telemetry_data.loc_current.lat = mavlink_msg_gps_raw_int_get_lat(msg) / 1E7;
telemetry_data.loc_current.lon = mavlink_msg_gps_raw_int_get_lon(msg) / 1E7;
telemetry_data.loc_current.gps_alt = mavlink_msg_gps_raw_int_get_alt(msg) / 1E3;
telemetry_data.eph = mavlink_msg_gps_raw_int_get_eph(msg) / 100.0;
@@ -266,26 +266,25 @@ static inline void REC_MAVLINK_MSG_ID_GPS_RAW_INT(const mavlink_message_t* msg)
telemetry_data.satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
}
#ifdef MAVLINK_PARAMS
const pm_char * getParamId(uint8_t idx) {
const pm_char *mav_params_id [((NB_PID_PARAMS / 2) + 4)] = { //
//
PSTR("RATE_YAW"), // Rate Yaw
PSTR("STB_YAW"), // Stabilize Yaw
PSTR("RATE_PIT"), // Rate Pitch
PSTR("STB_PIT"), // Stabilize Pitch
PSTR("RATE_RLL"), // Rate Roll
PSTR("STB_RLL"), // Stabilize Roll
PSTR("THR_ALT"), // PSTR("THR_BAR"), // Altitude Hold
PSTR("HLD_LON"), // Loiter
PSTR("HLD_LAT"), // Loiter
PSTR("NAV_LON"), // Nav WP
PSTR("NAV_LAT"), // Nav WP
PSTR("LOW_VOLT"), // Battery low voltage
PSTR("VOLT_DIVIDER"), //
PSTR("BATT_MONITOR"), //
PSTR("BATT_CAPACITY") };
const pm_char *getParamId(uint8_t idx) {
const pm_char *mav_params_id [((NB_PID_PARAMS / 2) + 4)] = {
PSTR("RATE_YAW"), // Rate Yaw
PSTR("STB_YAW"), // Stabilize Yaw
PSTR("RATE_PIT"), // Rate Pitch
PSTR("STB_PIT"), // Stabilize Pitch
PSTR("RATE_RLL"), // Rate Roll
PSTR("STB_RLL"), // Stabilize Roll
PSTR("THR_ALT"), // PSTR("THR_BAR"), // Altitude Hold
PSTR("HLD_LON"), // Loiter
PSTR("HLD_LAT"), // Loiter
PSTR("NAV_LON"), // Nav WP
PSTR("NAV_LAT"), // Nav WP
PSTR("LOW_VOLT"), // Battery low voltage
PSTR("VOLT_DIVIDER"), //
PSTR("BATT_MONITOR"), //
PSTR("BATT_CAPACITY")
};
uint8_t i;
if (idx < NB_PID_PARAMS) {
i = idx / 2;
@@ -433,7 +432,7 @@ static inline void handleMessage(mavlink_message_t* p_rxmsg) {
break;
case MAVLINK_MSG_ID_VFR_HUD:
REC_MAVLINK_MSG_ID_VFR_HUD(p_rxmsg);
break;
break;
case MAVLINK_MSG_ID_HIL_CONTROLS:
REC_MAVLINK_MSG_ID_HIL_CONTROLS(p_rxmsg);
break;
@@ -453,8 +452,8 @@ static inline void handleMessage(mavlink_message_t* p_rxmsg) {
/*! \brief Mavlink message parser
* \details Parses the characters in to a mavlink message.
* Case statement parses each character as it is recieved.
* \attention One big change form the 0.9 to 1.0 version is the
* Case statement parses each character as it is recieved.
* \attention One big change form the 0.9 to 1.0 version is the
* MAVLINK_CRC_EXTRA. This requires the mavlink_message_crcs array of 256 bytes.
* \todo create dot for the statemachine
*/
@@ -464,9 +463,9 @@ static void MAVLINK_parse_char(uint8_t c) {
//! The currently decoded message
static mavlink_message_t* p_rxmsg = &m_mavlink_message;
//! The current decode status
mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0);
mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0);
#if MAVLINK_CRC_EXTRA
static const uint8_t mavlink_message_crcs[256] PROGMEM = MAVLINK_MESSAGE_CRCS;
#define MAVLINK_MESSAGE_CRC(msgid) mavlink_message_crcs[msgid]
@@ -715,7 +714,7 @@ static inline void MAVLINK_msg_set_mode_send(uint8_t mode) {
#endif
/*! \brief Telemetry monitoring, calls \link MAVLINK10mspoll.
* \todo Reimplemnt \link MAVLINK10mspoll
*
*
*/
void telemetryWakeup() {
uint16_t tmr10ms = get_tmr10ms();
+7 -4
View File
@@ -178,7 +178,13 @@ void applyTemplate(uint8_t idx)
// Simple 4-Ch
case TMPL_SIMPLE_4CH:
clearInputs();
applyDefaultTemplate();
#if defined(PCBTARANIS)
#pragma message("Templates with virtual inputs (FrSky Taranis) are not implemented!")
#endif
setDest(ICC(STK_RUD), MIXSRC_Rud);
setDest(ICC(STK_ELE), MIXSRC_Ele);
setDest(ICC(STK_THR), MIXSRC_Thr);
setDest(ICC(STK_AIL), MIXSRC_Ail);
break;
// Sticky-T-Cut
@@ -203,9 +209,6 @@ void applyTemplate(uint8_t idx)
// Elevon\\Delta
case TMPL_ELEVON_DELTA:
defaultInputs();
#if defined(PCBTARANIS)
#pragma message("Templates below are not implemented (only V-TAIL has been done). Feel free to help!")
#endif
setDest(ICC(STK_ELE), MIXSRC_Ele, true);
setDest(ICC(STK_ELE), MIXSRC_Ail);
setDest(ICC(STK_AIL), MIXSRC_Ele, true);