[stock] 48bytes flash saved, 32bytes RAM saved

This commit is contained in:
bsongis
2013-03-13 10:26:56 +00:00
parent caaf6db7ad
commit 36e6751f73
11 changed files with 61 additions and 75 deletions
+3 -1
View File
@@ -511,11 +511,13 @@ ifeq ($(PCB), X9D)
EXTRAINCDIRS += x9d/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc x9d/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
EXTRAINCDIRS += x9d/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc x9d/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc
BOARDSRC = x9d/board_x9d.cpp
EXTRABOARDSRC += x9d/lcd_driver.cpp x9d/aspi.cpp x9d/i2c.c x9d/pwr_driver.cpp x9d/pulses_driver.cpp x9d/keys_driver.cpp x9d/adc_driver.cpp x9d/trainer_driver.cpp x9d/audio_driver.cpp x9d/delays.cpp x9d/uart_driver.cpp x9d/sport_driver.cpp
EXTRABOARDSRC += x9d/lcd_driver.cpp x9d/aspi.cpp x9d/i2c.c
EXTRABOARDSRC += x9d/lcd_driver.cpp x9d/aspi.cpp x9d/i2c.c
SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c
EEPROMSRC = eeprom_avr.cpp # TODO later eeprom_conversions.cpp
PULSESSRC = pulses_arm.cpp
CPPSRC += audio_arm.cpp
CPPSRC += x9d/pwr_driver.cpp x9d/pulses_driver.cpp x9d/keys_driver.cpp x9d/adc_driver.cpp x9d/trainer_driver.cpp x9d/audio_driver.cpp x9d/delays.cpp x9d/uart_driver.cpp x9d/sport_driver.cpp
CPPSRC += bmp.cpp monitors_views.cpp
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
+2 -2
View File
@@ -1,2 +1,2 @@
102,8,
0xff,0xff,0x00,0x00,0xff,0xff,0x1c,0x1c,0x6b,0xff,0xb6,0x22,0xbf,0xff,0xc0,0x80,0xff,0xff,0xe8,0xe8,0xbf,0xff,0xc0,0x80,0x6b,0xff,0xb6,0x22,0xff,0xff,0x1c,0x1c,0xff,0xff,0x00,0x00,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x20,0x20,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xc1,0x41,0x41,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xfd,0xfb,0x7b,0x79,0xfb,0xc7,0x47,0x43,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xe3,0xff,0x77,0x63,0xdd,0xff,0x63,0x41,0xdd,0xff,0x41,0x41,0xdd,0xff,0x63,0x41,0xe3,0xff,0x77,0x63,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xfd,0xff,0x43,0x41,0xff,0xff,0x7d,0x7d,0xff,0xff,0x73,0x73,0xff,0xff,0x7d,0x7d,0xdd,0xff,0x63,0x41,0xff,0xff,0x5f,0x5f,0xff,0xff,0x59,0x59,0xdd,0xff,0x63,0x41,0xff,0xff,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0x79,0xdd,0xff,0x63,0x41,0xff,0xff,0x59,0x59,0xff,0xff,0x5f,0x5f,0xf5,0xff,0x5b,0x51,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xd7,0xff,0x6d,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0x63,0x63,0xff,0xff,0x63,0x63,0xff,0xff,0x77,0x77,0xff,0xff,0x73,0x73,0xff,0xff,0x65,0x65,0xfd,0xff,0x57,0x55,0xff,0xff,0x77,0x77,0xff,0xff,0x63,0x63,0xeb,0xff,0x77,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x51,0x51,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,
102,8,
0xff,0xff,0x00,0x00,0xff,0xff,0x1c,0x1c,0x6b,0xff,0xb6,0x22,0xbf,0xff,0xc0,0x80,0xff,0xff,0xe8,0xe8,0xbf,0xff,0xc0,0x80,0x6b,0xff,0xb6,0x22,0xff,0xff,0x1c,0x1c,0xff,0xff,0x00,0x00,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x20,0x20,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xc1,0x41,0x41,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xfd,0xfb,0x7b,0x79,0xfb,0xc7,0x47,0x43,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xe3,0xff,0x77,0x63,0xdd,0xff,0x63,0x41,0xdd,0xff,0x41,0x41,0xdd,0xff,0x63,0x41,0xe3,0xff,0x77,0x63,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xfd,0xff,0x43,0x41,0xff,0xff,0x7d,0x7d,0xff,0xff,0x73,0x73,0xff,0xff,0x7d,0x7d,0xdd,0xff,0x63,0x41,0xff,0xff,0x5f,0x5f,0xff,0xff,0x59,0x59,0xdd,0xff,0x63,0x41,0xff,0xff,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0x79,0xdd,0xff,0x63,0x41,0xff,0xff,0x59,0x59,0xff,0xff,0x5f,0x5f,0xf5,0xff,0x5b,0x51,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xd7,0xff,0x6d,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0x63,0x63,0xff,0xff,0x63,0x63,0xff,0xff,0x77,0x77,0xff,0xff,0x73,0x73,0xff,0xff,0x65,0x65,0xfd,0xff,0x57,0x55,0xff,0xff,0x77,0x77,0xff,0xff,0x63,0x63,0xeb,0xff,0x77,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x51,0x51,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,
-4
View File
@@ -37,10 +37,6 @@
#include "open9x.h"
uint8_t s_evt;
void putEvent(uint8_t evt)
{
s_evt = evt;
}
#if defined(CPUARM)
uint8_t getEvent(bool trim)
+2 -2
View File
@@ -1081,7 +1081,7 @@ void menuModelSetup(uint8_t event)
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN, y, STR_SYNCMENU, (m_posHorz==1 ? attr : 0));
if (attr && m_posHorz==1) {
s_editMode = 0;
if (event==EVT_KEY_LONG(KEY_MENU)) {
if (event==EVT_KEY_LONG(KEY_ENTER)) {
// send reset code
pxxFlag = PXX_SEND_RXNUM;
}
@@ -1091,7 +1091,7 @@ void menuModelSetup(uint8_t event)
#if defined(DSM2)
if (IS_DSM2_PROTOCOL(protocol)) {
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\013Range[MENU]Norm [MENU]"), s_rangecheck_mode, (m_posHorz==1 ? attr : 0));
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\013Range"TR_ENTER"Norm "TR_ENTER), s_rangecheck_mode, (m_posHorz==1 ? attr : 0));
s_rangecheck_mode = (attr && m_posHorz==1 && editMode>0); // [MENU] key toggles range check mode
}
#endif
+38 -35
View File
@@ -272,7 +272,6 @@ void per10ms()
rePreviousValue = reNewValue;
putEvent(scrollRE < 0 ? EVT_ROTARY_LEFT : EVT_ROTARY_RIGHT);
}
extern uint8_t s_evt;
uint8_t evt = s_evt;
if (EVT_KEY_MASK(evt) == BTN_REa + NAVIGATION_RE_IDX()) {
if (IS_KEY_BREAK(evt)) {
@@ -528,7 +527,8 @@ uint16_t expou(uint16_t x, uint16_t k)
bool extended;
if (k>80) {
extended=true;
} else {
}
else {
k+=(k>>2); // use bigger values before extend, because the effect is anyway very very low
extended=false;
} // endif k > 50
@@ -781,30 +781,30 @@ int16_t applyLimits(uint8_t channel, int32_t value)
#if defined(PPM_LIMITS_SYMETRICAL)
if (value) {
int16_t tmp;
int16_t tmp;
if (lim->symetrical)
tmp = (value > 0) ? (lim_p) : (-lim_n);
else
tmp = (value > 0) ? (lim_p - ofs) : (-lim_n + ofs);
value = (int32_t) value * tmp; // div by 1024*256 -> output = -1024..1024
value = (int32_t) value * tmp; // div by 1024*256 -> output = -1024..1024
#else
if (value) {
int16_t tmp = (value > 0) ? (lim_p - ofs) : (-lim_n + ofs);
value = (int32_t) value * tmp; // div by 1024*256 -> output = -1024..1024
value = (int32_t) value * tmp; // div by 1024*256 -> output = -1024..1024
#endif
#ifdef CORRECT_NEGATIVE_SHIFTS
int8_t sign=(value<0?1:0);
value-=sign;
tmp=value>>16; // that's quite tricky: the shiftright 16 operation is assmbled just with addressmove; just forget the two least significant bytes;
tmp>>=2; // now one simple shift right for two bytes does the rest
tmp+=sign;
int8_t sign = (value<0?1:0);
value -= sign;
tmp = value>>16; // that's quite tricky: the shiftright 16 operation is assmbled just with addressmove; just forget the two least significant bytes;
tmp >>= 2; // now one simple shift right for two bytes does the rest
tmp += sign;
#else
tmp=value>>16; // that's quite tricky: the shiftright 16 operation is assmbled just with addressmove; just forget the two least significant bytes;
tmp>>=2; // now one simple shift right for two bytes does the rest
tmp = value>>16; // that's quite tricky: the shiftright 16 operation is assmbled just with addressmove; just forget the two least significant bytes;
tmp >>= 2; // now one simple shift right for two bytes does the rest
#endif
ofs+=tmp; // ofs can to added directly because already recalculated,
ofs += tmp; // ofs can to added directly because already recalculated,
}
if (ofs > lim_p) ofs = lim_p;
@@ -862,8 +862,7 @@ int16_t getValue(uint8_t i)
#endif
else if (i<MIXSRC_LAST_CSW) return __getSwitch(SWSRC_THR+i+1-MIXSRC_THR) ? 1024 : -1024;
#endif
else if (i<MIXSRC_PPM1+NUM_CAL_PPM) return (g_ppmIns[i+1-MIXSRC_PPM1] - g_eeGeneral.trainer.calib[i+1-MIXSRC_PPM1])*2;
else if (i<MIXSRC_LAST_PPM) return g_ppmIns[i+1-MIXSRC_PPM1]*2;
else if (i<MIXSRC_LAST_PPM) { int16_t x = g_ppmIns[i+1-MIXSRC_PPM1]; if (i<MIXSRC_PPM1+NUM_CAL_PPM) { x-= g_eeGeneral.trainer.calib[i+1-MIXSRC_PPM1]; } return x*2; }
else if (i<MIXSRC_LAST_CH) return ex_chans[i+1-MIXSRC_CH1];
#if defined(GVARS)
else if (i<MIXSRC_LAST_GVAR) return GVAR_VALUE(i+1-MIXSRC_GVAR1, getGVarFlightPhase(s_perout_flight_phase, i+1-MIXSRC_GVAR1));
@@ -1394,8 +1393,9 @@ void checkBacklight()
rotencPoll();
#endif
if (tmr10ms != g_blinkTmr10ms) {
tmr10ms = g_blinkTmr10ms;
uint8_t x = g_blinkTmr10ms;
if (tmr10ms != x) {
tmr10ms = x;
uint16_t tsum = stickMoveValue();
if (tsum != inacSum) {
inacSum = tsum;
@@ -1675,7 +1675,7 @@ uint8_t checkTrim(uint8_t event)
if (k>=0 && k<8 && !IS_KEY_BREAK(event)) {
#endif
// LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP
uint8_t idx = CONVERT_MODE(1+k/2) - 1;
uint8_t idx = CONVERT_MODE(1+(uint8_t)k/2) - 1;
uint8_t phase;
int16_t before;
bool thro;
@@ -1814,18 +1814,19 @@ uint16_t anaIn(uint8_t chan)
#if defined(PCBX9D)
// crossAna[]={LH,LV,RH,RV,S1,S2,LS,RS,BAT
// s_anaFilt[]={LH,LV,RH,RV,S1,S2,LS,RS,_BAT
static const uint8_t crossAna[]={0,1,2,3,4,5,6,7,8};
return s_anaFilt[chan];
#elif defined(PCBSKY9X) && !defined(REVA)
static const uint8_t crossAna[]={1,5,7,0,4,6,2,3};
if (chan == TX_CURRENT) {
return Current_analogue ;
}
#else
static const pm_char crossAna[] PROGMEM ={3,1,2,0,4,5,6,7};
#endif
volatile uint16_t *p = &s_anaFilt[pgm_read_byte(crossAna+chan)];
return *p;
#else
static const pm_char crossAna[] PROGMEM = {3,1,2,0,4,5,6,7};
volatile uint16_t *p = &s_anaFilt[pgm_read_byte(crossAna+chan)];
return *p;
#endif
}
#if defined(CPUARM)
@@ -1893,7 +1894,7 @@ void getADC_bandgap()
ADCSRB |= (1<<MUX5);
#else
// TODO is the next line needed (because it has been called before perMain)?
ADMUX=0x1E|ADC_VREF_TYPE; // Switch MUX to internal 1.22V reference
ADMUX = 0x1E|ADC_VREF_TYPE; // Switch MUX to internal 1.22V reference
/*
MCUCR|=0x28; // enable Sleep (bit5) enable ADC Noise Reduction (bit2)
@@ -1905,10 +1906,9 @@ void getADC_bandgap()
MCUCR&=0x08; // disable sleep
*/
ADCSRA|=0x40;
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10; // take sample
BandGap=ADC;
ADCSRA |= 0x40;
while (ADCSRA & 0x40);
BandGap = ADC;
#endif
}
#endif
@@ -1996,7 +1996,7 @@ uint16_t inacSum = 0;
BeepANACenter bpanaCenter = 0;
uint16_t sDelay[MAX_MIXERS] = {0};
int32_t act [MAX_MIXERS] = {0};
__int24 act [MAX_MIXERS] = {0};
uint8_t swOn [MAX_MIXERS] = {0};
uint8_t mixWarning;
@@ -2804,7 +2804,8 @@ void perOut(uint8_t mode, uint8_t tick10ms)
if (mode == e_perout_mode_normal && (md->speedUp || md->speedDown)) { // there are delay values
#define DEL_MULT_SHIFT 8
// we recale to a mult 256 higher value for calculation
int16_t diff = v - ((int32_t) act[i]>>DEL_MULT_SHIFT);
int32_t tact = act[i];
int16_t diff = v - (tact>>DEL_MULT_SHIFT);
if (diff) {
// open.20.fsguruh: speed is defined in % movement per second; In menu we specify the full movement (-100% to 100%) = 200% in total
// the unit of the stored value is the value from md->speedUp or md->speedDown divide SLOW_STEP seconds; e.g. value 4 means 4/SLOW_STEP = 2 seconds for CPU64
@@ -2819,21 +2820,21 @@ void perOut(uint8_t mode, uint8_t tick10ms)
if (diff>0) {
if (md->speedUp>0) {
// if a speed upwards is defined recalculate the new value according configured speed; the higher the speed the smaller the add value is
int32_t newValue = act[i]+rate/((int16_t)(100/SLOW_STEP)*md->speedUp);
int32_t newValue = tact+rate/((int16_t)(100/SLOW_STEP)*md->speedUp);
if (newValue<currentValue) currentValue=newValue; // Endposition; prevent toggling around the destination
}
}
else { // if is <0 because ==0 is not possible
if (md->speedDown>0) {
// see explanation in speedUp
int32_t newValue = act[i]-rate/((int16_t)(100/SLOW_STEP)*md->speedDown);
int32_t newValue = tact-rate/((int16_t)(100/SLOW_STEP)*md->speedDown);
if (newValue>currentValue) currentValue=newValue; // Endposition; prevent toggling around the destination
}
} //endif diff>0
act[i] = currentValue;
act[i] = tact = currentValue;
// open.20.fsguruh: this implementation would save about 50 bytes code
} // endif tick10ms ; in case no time passed assign the old value, not the current value from source
v = (act[i] >> DEL_MULT_SHIFT);
v = (tact >> DEL_MULT_SHIFT);
} //endif diff
} //endif speed
@@ -4032,10 +4033,12 @@ void menusTask(void * pdata)
while (pwrCheck() != e_power_off) {
perMain();
#if defined(PCBSKY9X)
for (uint8_t i=0; i<5; i++) {
usbMassStorage();
CoTickDelay(1); // 5*2ms for now
}
#endif
}
#if defined(SDCARD)
@@ -4143,7 +4146,7 @@ int main(void)
open9xInit(mcusr);
#endif
#if defined(CPUARM)
#if defined(PCBSKY9X)
if (BOOTLOADER_REQUEST()) {
pwrOff(); // Only turn power off if necessary
+2 -3
View File
@@ -653,18 +653,17 @@ extern uint8_t pxxFlag;
extern char idx2char(int8_t idx);
extern uint8_t s_evt;
#define putEvent(evt) s_evt = evt
void clearKeyEvents();
void pauseEvents(uint8_t enuk);
void killEvents(uint8_t enuk);
#if defined(CPUARM)
uint8_t getEvent(bool trim);
#else
uint8_t getEvent();
#endif
void putEvent(uint8_t evt);
uint8_t keyDown();
enum PowerState {
+1
View File
@@ -97,6 +97,7 @@ typedef const uint16_t pm_uint16_t;
typedef const uint8_t pm_uint8_t;
typedef const int16_t pm_int16_t;
typedef const int8_t pm_int8_t;
typedef int32_t __int24;
#if defined(PCBX9D) || defined(PCBACT)
extern GPIO_TypeDef gpioa;
-2
View File
@@ -98,8 +98,6 @@
#define PIN_TRIM_RH_R 0x00000200
#endif
void usbMassStorage();
#define PIN_ENABLE 0x001
#define PIN_PERIPHERAL 0x000
#define PIN_INPUT 0x002
+9 -16
View File
@@ -327,16 +327,15 @@
#define INDENT_WIDTH (FW/2)
#if defined(PCBX9D)
#define TR_POPUPS "[ENTER]\010[EXIT]"
#define TR_ENTER "[ENTER]"
#else
#define TR_POPUPS "[MENU]\010[EXIT]"
#define TR_ENTER "[MENU]"
#endif
#define TR_POPUPS TR_ENTER"\010[EXIT]"
#define OFS_EXIT 7
#if defined(PCBX9D)
#define TR_MENUWHENDONE CENTER"\006[ENTER] WHEN DONE"
#else
#define TR_MENUWHENDONE CENTER"\006[MENU] WHEN DONE"
#endif
#define TR_MENUWHENDONE CENTER"\006"TR_ENTER" WHEN DONE"
#define TR_FREE "free"
#define TR_DELETEMODEL "DELETE MODEL"
#define TR_COPYINGMODEL "Copying model..."
@@ -434,13 +433,7 @@
#define TR_CAL "Cal"
#define TR_VTRIM "Trim- +"
#define TR_BG "BG:"
#if defined(PCBX9D)
#define TR_MENUTOSTART CENTER"\006[ENTER] TO START"
#else
#define TR_MENUTOSTART CENTER"\006[MENU] TO START"
#endif
#define TR_MENUTOSTART CENTER"\006"TR_ENTER" TO START"
#define TR_SETMIDPOINT CENTER"\003SET STICKS MIDPOINT"
#define TR_MOVESTICKSPOTS CENTER"\006MOVE STICKS/POTS"
#define TR_RXBATT "Rx Batt:"
@@ -475,7 +468,7 @@
#define TR_PRESSANYKEYTOSKIP CENTER"Press any key to skip"
#define TR_THROTTLENOTIDLE CENTER"Throttle not idle"
#define TR_ALARMSDISABLED CENTER"Alarms Disabled"
#define TR_PRESSANYKEY TR("\010Press any Key",CENTER"Press any Key")
#define TR_PRESSANYKEY TR("\010Press any Key", CENTER"Press any Key")
#define TR_BADEEPROMDATA CENTER"Bad EEprom Data"
#define TR_EEPROMFORMATTING CENTER"Formatting EEPROM"
#define TR_EEPROMOVERFLOW CENTER"EEPROM overflow"
@@ -511,7 +504,7 @@
#define TR_MENUSTAT "STATS"
#define TR_MENUDEBUG "DEBUG"
#define TR_RXNUM TR("RxNum","Receiver No.")
#define TR_SYNCMENU "Sync [MENU]"
#define TR_SYNCMENU "Sync "TR_ENTER
#define TR_LIMIT INDENT"Limit"
#define TR_MINRSSI "Min Rssi"
#define TR_LATITUDE "Latitude"
+2 -8
View File
@@ -128,14 +128,7 @@ void start_ppm_capture()
{
}
void usbBootloader()
{
}
void usbMassStorage()
{
}
#if !defined(SIMU)
extern "C" {
USB_OTG_CORE_HANDLE USB_OTG_dev;
@@ -149,6 +142,7 @@ void usbInit()
{
USBD_Init(&USB_OTG_dev, USB_OTG_FS_CORE_ID, &USR_desc, &USBD_MSC_cb, &USR_cb);
}
#endif
void watchdogInit()
{
+2 -2
View File
@@ -50,10 +50,10 @@ uint32_t pwrCheck()
return e_power_on;
#if !defined(REV3)
else if (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_RESET)
return e_power_trainer;
return e_power_trainer;
#endif
else if (usbPlugged())
return e_power_usb;
return e_power_usb;
else
return e_power_off;
#endif