[all] PPM_UNIT instead of PPM_LIMITS_UNIT and DECIMALS Makefile options

[sky9x] Aurora gimbals support (untested)
[arm] Start of implementation for sounds associated to Mix/FP/Switches in SD directories
This commit is contained in:
bsongis
2012-12-16 13:30:59 +00:00
parent 7329d8b728
commit bc52f7077f
26 changed files with 256 additions and 95 deletions
+31 -2
View File
@@ -765,7 +765,7 @@ void menuGeneralTrainer(uint8_t event)
lcd_putsAtt(0*FW, 7*FH, STR_CAL, attr);
for (uint8_t i=0; i<4; i++) {
uint8_t x = (i*8+16)*FW/2;
#if defined (DECIMALS_DISPLAYED)
#if defined (PPM_UNIT_PERCENT_PREC1)
lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])*2, PREC1);
#else
lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])/5, 0);
@@ -908,6 +908,11 @@ void menuGeneralDiagAna(uint8_t event)
#if defined(PCBSKY9X)
enum menuGeneralHwItems {
ITEM_SETUP_HW_OPTREX_DISPLAY,
ITEM_SETUP_HW_STICKS_GAINS_LABELS,
ITEM_SETUP_HW_STICK_LV_GAIN,
ITEM_SETUP_HW_STICK_LH_GAIN,
ITEM_SETUP_HW_STICK_RV_GAIN,
ITEM_SETUP_HW_STICK_RH_GAIN,
IF_BLUETOOTH(ITEM_SETUP_HW_BT_BAUDRATE)
ITEM_SETUP_HW_MAX
};
@@ -915,7 +920,7 @@ enum menuGeneralHwItems {
#define GENERAL_HW_PARAM_OFS (2+(15*FW))
void menuGeneralHardware(uint8_t event)
{
MENU(STR_HARDWARE, menuTabDiag, e_Hardware, ITEM_SETUP_HW_MAX+1, {0, 0, IF_BLUETOOTH(0)});
MENU(STR_HARDWARE, menuTabDiag, e_Hardware, ITEM_SETUP_HW_MAX+1, {0, 0, (uint8_t)-1, 0, 0, 0, 0, IF_BLUETOOTH(0)});
uint8_t sub = m_posVert - 1;
@@ -930,6 +935,30 @@ void menuGeneralHardware(uint8_t event)
g_eeGeneral.optrexDisplay = selectMenuItem(GENERAL_HW_PARAM_OFS, y, STR_LCD, STR_VLCD, g_eeGeneral.optrexDisplay, 0, 1, attr, event);
break;
case ITEM_SETUP_HW_STICKS_GAINS_LABELS:
lcd_putsLeft(y, PSTR("Sticks"));
break;
case ITEM_SETUP_HW_STICK_LV_GAIN:
case ITEM_SETUP_HW_STICK_LH_GAIN:
case ITEM_SETUP_HW_STICK_RV_GAIN:
case ITEM_SETUP_HW_STICK_RH_GAIN:
{
lcd_putsiAtt(INDENT_WIDTH, y, PSTR("\002LVLHRVRH"), k-ITEM_SETUP_HW_STICK_LV_GAIN, 0);
lcd_puts(INDENT_WIDTH+3*FW, y, PSTR("Gain"));
uint8_t mask = (1<<(k-ITEM_SETUP_HW_STICK_LV_GAIN));
uint8_t val = (g_eeGeneral.sticksGain & mask ? 1 : 0);
lcd_putcAtt(15*FW, y, val ? '2' : '1', attr);
if (attr) {
CHECK_INCDEC_GENVAR(event, val, 0, 1);
if (checkIncDec_Ret) {
g_eeGeneral.sticksGain ^= mask;
setSticksGain(g_eeGeneral.sticksGain);
}
}
break;
}
#if defined(BLUETOOTH)
case ITEM_SETUP_HW_BT_BAUDRATE:
g_eeGeneral.btBaudrate = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_BAUDRATE, PSTR("\005115k 9600 19200"), g_eeGeneral.btBaudrate, 0, 2, attr, event);