This commit is contained in:
Markus Sattler
2015-09-26 07:59:04 +02:00
committed by Bertrand Songis
parent b48946b3aa
commit 1d6adcc25a
145 changed files with 14 additions and 14 deletions
Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

View File
Executable → Regular
View File
View File
View File

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

View File

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 583 B

View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
View File
+7 -7
View File
@@ -79,7 +79,7 @@ enum menuModelSetupItems {
ITEM_MODEL_EXTERNAL_MODULE_OUTPUT_TYPE,
#endif
ITEM_MODEL_EXTERNAL_MODULE_FAILSAFE,
#if defined(PCBSKY9X) && !defined(REVA) && !defined(REVX)
#if defined(PCBSKY9X) && !defined(REVA)
ITEM_MODEL_EXTRA_MODULE_LABEL,
ITEM_MODEL_EXTRA_MODULE_CHANNELS,
ITEM_MODEL_EXTRA_MODULE_BIND,
@@ -102,7 +102,7 @@ enum menuModelSetupItems {
#define MODEL_SETUP_RANGE_OFS 4*FW+3
#define MODEL_SETUP_SET_FAILSAFE_OFS 7*FW-2
#if defined(PCBSKY9X) && !defined(REVA) && !defined(REVX)
#if defined(PCBSKY9X) && !defined(REVA)
#define CURRENT_MODULE_EDITED(k) (k>=ITEM_MODEL_EXTRA_MODULE_LABEL ? EXTRA_MODULE : EXTERNAL_MODULE)
#else
#define CURRENT_MODULE_EDITED(k) (EXTERNAL_MODULE)
@@ -116,7 +116,7 @@ void menuModelSetup(uint8_t event)
#define IS_D8_RX(x) (g_model.moduleData[x].rfProtocol == RF_PROTO_D8)
#define EXTERNAL_MODULE_CHANNELS_ROWS() IF_EXTERNAL_MODULE_ON(IS_MODULE_DSM2(EXTERNAL_MODULE) ? (uint8_t)0 : (uint8_t)1)
#define EXTERNAL_MODULE_SETTINGS_ROWS() (IS_MODULE_XJT(EXTERNAL_MODULE) && IS_D8_RX(EXTERNAL_MODULE)) ? (uint8_t)1 : (IS_MODULE_PPM(EXTERNAL_MODULE) || IS_MODULE_XJT(EXTERNAL_MODULE) || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)2 : HIDDEN_ROW
#if defined(PCBSKY9X) && defined(REVX)
#if defined(PCBSKY9X) && !defined(REVX)
#define OUTPUT_TYPE_ROWS() (IS_MODULE_PPM(EXTERNAL_MODULE) ? (uint8_t)0 : HIDDEN_ROW) ,
#else
#define OUTPUT_TYPE_ROWS()
@@ -128,7 +128,7 @@ void menuModelSetup(uint8_t event)
#define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX)
#define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0)
#define TIMER_ROWS 2, 0, CASE_PERSISTENT_TIMERS(0) 0, 0
#if (defined(PCBSKY9X) && !defined(REVA) && !defined(REVX))
#if (defined(PCBSKY9X) && !defined(REVA))
#define EXTRA_MODULE_ROWS LABEL(ExtraModule), 1, 2,
#else
#define EXTRA_MODULE_ROWS
@@ -485,7 +485,7 @@ void menuModelSetup(uint8_t event)
break;
#endif
#if defined(PCBSKY9X) && !defined(REVX)
#if defined(PCBSKY9X)
case ITEM_MODEL_EXTRA_MODULE_LABEL:
lcd_putsLeft(y, "RF Port 2 (PPM)");
break;
@@ -530,7 +530,7 @@ void menuModelSetup(uint8_t event)
break;
#endif
#if defined(PCBSKY9X) && !defined(REVX)
#if defined(PCBSKY9X)
case ITEM_MODEL_EXTRA_MODULE_CHANNELS:
#endif
#if defined(CPUARM)
@@ -562,7 +562,7 @@ void menuModelSetup(uint8_t event)
}
#endif
#if defined(PCBSKY9X) && !defined(REVX)
#if defined(PCBSKY9X)
case ITEM_MODEL_EXTRA_MODULE_BIND:
#endif
#if defined(CPUARM)
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
+2 -2
View File
@@ -506,12 +506,12 @@
#endif
#define MAX_EXTERNAL_MODULE_CHANNELS() ((g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[1].rfProtocol] : maxChannelsModules[g_model.moduleData[EXTERNAL_MODULE].type])
#define MAX_CHANNELS(idx) (idx==INTERNAL_MODULE ? MAX_INTERNAL_MODULE_CHANNELS() : (idx==EXTERNAL_MODULE ? MAX_EXTERNAL_MODULE_CHANNELS() : MAX_TRAINER_CHANNELS()))
#elif defined(PCBSKY9X) && !defined(REVA) && !defined(REVX)
#elif defined(PCBSKY9X) && !defined(REVA)
#define IS_MODULE_PPM(idx) (idx==TRAINER_MODULE || idx==EXTRA_MODULE || (idx==EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type==MODULE_TYPE_PPM))
#define IS_MODULE_XJT(idx) (idx==EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type==MODULE_TYPE_XJT)
#define IS_MODULE_DSM2(idx) (idx==EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type==MODULE_TYPE_DSM2)
#define MAX_EXTERNAL_MODULE_CHANNELS() ((g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[0].rfProtocol] : maxChannelsModules[g_model.moduleData[EXTERNAL_MODULE].type])
#define MAX_EXTRA_MODULE_CHANNELS() (0) // Only PPM
#define MAX_EXTRA_MODULE_CHANNELS() (8) // Only PPM (16ch PPM)
#define MAX_CHANNELS(idx) (idx==EXTERNAL_MODULE ? MAX_EXTERNAL_MODULE_CHANNELS() : (idx==EXTRA_MODULE ? MAX_EXTRA_MODULE_CHANNELS() : MAX_TRAINER_CHANNELS()))
#else
#define IS_MODULE_PPM(idx) (idx==TRAINER_MODULE || (idx==EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type==MODULE_TYPE_PPM))
Executable → Regular
View File
+4 -4
View File
@@ -78,7 +78,7 @@ void init_main_ppm(uint32_t period, uint32_t out_enable)
pwmptr->PWM_ENA = PWM_ENA_CHID3 ; // Enable channel 3
pwmptr->PWM_IER1 = PWM_IER1_CHID3 ;
#if !defined(REVA) && !defined(REVX)
#if !defined(REVA)
// PWM1 for PPM2
configure_pins(PIO_PC15, PIN_PERIPHERAL | PIN_INPUT | PIN_PER_B | PIN_PORTC | PIN_NO_PULLUP ) ;
pwmptr->PWM_CH_NUM[1].PWM_CMR = 0x0000000B ; // CLKB
@@ -137,9 +137,9 @@ void disable_ppm(uint32_t port)
PWM->PWM_IDR1 = PWM_IDR1_CHID3 ;
}
else {
#if !defined(REVA) && !defined(REVX)
#if !defined(REVA)
pioptr = PIOC ;
pioptr->PIO_PER = PIO_PC17 ; // Assign A17 to PIO
pioptr->PIO_PER = PIO_PC17 ; // Assign C17 to PIO
PWM->PWM_IDR1 = PWM_IDR1_CHID1 ;
NVIC_DisableIRQ(PWM_IRQn) ;
#endif
@@ -290,7 +290,7 @@ extern "C" void PWM_IRQHandler(void)
}
}
#if !defined(REVA) && !defined(REVX)
#if !defined(REVA)
if (reason & PWM_ISR1_CHID1) {
pwmptr->PWM_CH_NUM[1].PWM_CPDRUPD = modulePulsesData[EXTRA_MODULE].ppm.pulses[modulePulsesData[EXTRA_MODULE].ppm.index++] ; // Period in half uS
if (modulePulsesData[EXTRA_MODULE].ppm.pulses[modulePulsesData[EXTRA_MODULE].ppm.index] == 0) {
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
View File