Merge remote-tracking branch 'origin/next' into bsongis/9XR-PRO_port

Conflicts:
	companion/src/avroutputdialog.cpp
	companion/src/burnconfigdialog.cpp
	companion/src/eeprominterface.cpp
	companion/src/eeprominterface.h
	companion/src/firmwares/opentx/opentxinterface.cpp
	companion/src/helpers.cpp
	radio/src/gui/menu_general.cpp
	radio/src/opentx.cpp
This commit is contained in:
bsongis
2014-03-03 16:41:41 +01:00
1753 changed files with 183140 additions and 111274 deletions
+7 -7
View File
@@ -45,12 +45,12 @@ const char ana_direction[NUMBER_ANALOG] = {1, 1, 0, 1 ,0 ,1 ,0, 0, 0};
// Settings for mode register ADC_MR
// USEQ off - silicon problem, doesn't work
// TRANSFER = 1
// TRACKTIM = 4 (5 clock periods)
// ANACH = 0
// SETTLING = 1 (not used if ANACH = 0)
// STARTUP = 1 (8 clock periods)
// PRESCAL = 3.6 MHz clock (between 1 and 20MHz)
// TRANSFER = 3
// TRACKTIM = 15 (16 clock periods)
// ANACH = 1
// SETTLING = 6 (not used if ANACH = 0)
// STARTUP = 6 (96 clock periods)
// PRESCAL = 9.0 MHz clock (between 1 and 20MHz)
// FREERUN = 0
// FWUP = 0
// SLEEP = 0
@@ -66,7 +66,7 @@ void adcInit()
// Enable peripheral clock ADC = bit 29
PMC->PMC_PCER0 |= 0x20000000L ; // Enable peripheral clock to ADC
padc = ADC ;
padc->ADC_MR = 0x14110000 | timer ; // 0001 0100 0001 0001 xxxx xxxx 0000 0000
padc->ADC_MR = 0x3FB60000 | timer ; // 0011 1111 1011 0110 xxxx xxxx 0000 0000
padc->ADC_ACR = ADC_ACR_TSON ; // Turn on temp sensor
#if defined(REVA)
padc->ADC_CHER = 0x0000E23E ; // channels 1,2,3,4,5,9,13,14,15
+2 -2
View File
@@ -310,11 +310,11 @@ extern "C" void TC3_IRQHandler() //capture ppm in at 2MHz
// G: We process g_ppmIns immediately here, to make servo movement as smooth as possible
// while under trainee control
if (val>4000 && val<19000) { // G: Prioritize reset pulse. (Needed when less than 8 incoming pulses)
if (val>4000 && val<19000) { // G: Prioritize reset pulse. (Needed when less than 16 incoming pulses)
ppmInState = 1; // triggered
}
else {
if (ppmInState && ppmInState<=8)
if (ppmInState && ppmInState<=16)
{
if (val>800 && val<2200) // if valid pulse-width range
{
+5 -2
View File
@@ -254,9 +254,12 @@ void rotencInit();
void rotencEnd();
#if ROTARY_ENCODERS > 0
#define rotencDown() (!(PIOB->PIO_PDSR & 0x40))
#define REA_DOWN() (!(PIOB->PIO_PDSR & 0x40))
#else
#define rotencDown() 0
#define REA_DOWN() (0)
#endif
// Debug driver
void debugPutc(const char c);
#endif
+2 -2
View File
@@ -1014,7 +1014,7 @@ void sdMountPoll()
case SD_ST_DATA:
if (!usbPlugged() && f_mount(0, &g_FATFS_Obj) == FR_OK) {
refreshSystemAudioFiles();
referenceSystemAudioFiles();
Card_state = SD_ST_MOUNTED;
}
break;
@@ -1082,7 +1082,7 @@ void sdInit()
Card_state = SD_ST_DATA;
if (f_mount(0, &g_FATFS_Obj) == FR_OK) {
refreshSystemAudioFiles();
referenceSystemAudioFiles();
Card_state = SD_ST_MOUNTED;
}
+7 -2
View File
@@ -113,9 +113,14 @@ uint32_t readTrims()
return result;
}
uint8_t trimDown(uint8_t idx)
{
return readTrims() & (1 << idx);
}
uint8_t keyDown()
{
return (~readKeys() & 0x7E) || rotencDown();
return (~readKeys() & 0x7E) || REA_DOWN();
}
void readKeysAndTrims()
@@ -123,7 +128,7 @@ void readKeysAndTrims()
register uint32_t i;
#if ROTARY_ENCODERS > 0
keys[BTN_REa].input(rotencDown(), BTN_REa);
keys[BTN_REa].input(REA_DOWN(), BTN_REa);
#endif
uint8_t enuk = KEY_MENU;