[X9D] 10 characters for audio files, 3-column on custom telemetry screens

This commit is contained in:
bernet.andre@gmail.com
2013-03-05 00:06:22 +00:00
parent 8bb4681578
commit c66fab2e6d
4 changed files with 42 additions and 11 deletions
+1
View File
@@ -277,6 +277,7 @@ ifeq ($(PCB), X9D)
MCU = cortex-m3
CPPDEFS += -DHSE_VALUE=12000000
SDCARD = YES
EXT = FRSKY
endif
CC = $(TRGT)gcc
+14 -3
View File
@@ -1355,10 +1355,15 @@ void menuTelemetryFrsky(uint8_t event)
// Custom Screen with numbers
uint8_t fields_count = 0;
for (uint8_t i=0; i<4; i++) {
for (uint8_t j=0; j<2; j++) {
for (uint8_t j=0; j<NUM_LINE_ITEMS; j++) {
uint8_t field = screen.lines[i].sources[j];
if (i==3 && j==0) {
#if !defined(PCBX9D)
lcd_vline(63, 8, 48);
#else
lcd_vline(70, 8, 48);
lcd_vline(140, 8, 48);
#endif
if (frskyStreaming > 0) {
#if defined(FRSKY_HUB)
if (field == TELEM_ACC) {
@@ -1388,8 +1393,14 @@ void menuTelemetryFrsky(uint8_t event)
putsTime(x, 1+FH+2*FH*i, value, att, att);
}
else {
putsTelemetryChannel(j ? 128 : 63, i==3 ? 1+7*FH : 1+2*FH+2*FH*i, field-1, value, att);
lcd_putsiAtt(j*65, 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0);
uint8_t pos[NUM_LINE_ITEMS];
#if !defined(PCBX9D)
pos[0] = 0; pos[1] = 63; pos[2] = 128;// {0, 63, 128};
#else
pos[0] = 0; pos[1] = 70; pos[2] = 140; pos[3] = 212;// {0, 70, 140, 212};
#endif
putsTelemetryChannel(pos[j+1], i==3 ? 1+7*FH : 1+2*FH+2*FH*i, field-1, value, att);
lcd_putsiAtt(j?pos[j]+2:0, 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0);
}
}
}
+15 -6
View File
@@ -3573,9 +3573,9 @@ void menuModelCustomFunctions(uint8_t event)
else if (sd->swtch && CFN_FUNC(sd) >= FUNC_PLAY_TRACK && CFN_FUNC(sd) <= FUNC_PLAY_VALUE) {
#if defined(CPUARM)
if (CFN_PLAY_REPEAT(sd))
lcd_outdezAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+2+FW, y, CFN_PLAY_REPEAT(sd)*5, attr);
lcd_outdezAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+2+5*FW, y, CFN_PLAY_REPEAT(sd)*5, attr);
else
lcd_putcAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+1, y, '-', attr);
lcd_putcAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+1+4*FW, y, '-', attr);
if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_PLAY_REPEAT(sd), 12);
#else
if (CFN_PLAY_REPEAT(sd))
@@ -3666,7 +3666,8 @@ enum menuModelTelemetryItems {
#ifdef FRSKY
#if LCD_W >= 212
#define TELEM_COL2 (LCD_W-17*FW-MENUS_SCROLLBAR_WIDTH)
#define TELEM_COL2 14*FW
#define TELEM_COL3 29*FW
#elif defined(TRANSLATIONS_FR) || defined(TRANSLATIONS_CZ)
#define TELEM_COL2 (9*FW)
#else
@@ -3953,14 +3954,22 @@ void menuModelTelemetry(uint8_t event)
}
}
else {
for (uint8_t c=0; c<2; c++) {
for (uint8_t c=0; c<NUM_LINE_ITEMS; c++) {
uint8_t & value = g_model.frsky.screens[screenIndex].lines[lineIndex].sources[c];
lcd_putsiAtt(c==0?INDENT_WIDTH:TELEM_COL2, y, STR_VTELEMCHNS, value, m_posHorz==c ? attr : 0);
uint8_t pos;
switch(c){
case 0: pos = INDENT_WIDTH; break;
case 1: pos = TELEM_COL2; break;
#if defined(PCBX9D)
case 2: pos = TELEM_COL3; break;
#endif
}
lcd_putsiAtt(pos, y, STR_VTELEMCHNS, value, m_posHorz==c ? attr : 0);
if (attr && m_posHorz==c && (s_editMode>0 || p1valdiff)) {
CHECK_INCDEC_MODELVAR_ZERO(event, value, g_model.frsky.usrProto ? ((lineIndex==3 && c==0) ? TELEM_STATUS_MAX : TELEM_DISPLAY_MAX) : TELEM_NOUSR_MAX);
}
}
if (attr && m_posHorz == 2) {
if (attr && m_posHorz == NUM_LINE_ITEMS) {
REPEAT_LAST_CURSOR_MOVE();
}
}
+12 -2
View File
@@ -408,11 +408,16 @@ enum ResetFunctionParam {
};
#if defined(CPUARM)
#if defined(PCBX9D)
#define LEN_CFN_NAME 10
#else
#define LEN_CFN_NAME 6
#endif
PACK(typedef struct t_CustomFnData { // Function Switches data
int8_t swtch;
uint8_t func;
union {
char name[6];
char name[LEN_CFN_NAME];
struct {
uint32_t val;
uint16_t spare;
@@ -579,8 +584,13 @@ PACK(typedef struct t_FrSkyBarData {
uint8_t barMax; // ditto for max display (would usually = ratio)
}) FrSkyBarData;
#if defined(PCBX9D)
#define NUM_LINE_ITEMS 3
#else
#define NUM_LINE_ITEMS 2
#endif
PACK(typedef struct t_FrSkyLineData {
uint8_t sources[2];
uint8_t sources[NUM_LINE_ITEMS];
}) FrSkyLineData;
typedef union t_FrSkyScreenData {