Fix timer display (is DATETIME but no date available) (#5299)
This commit is contained in:
@@ -318,6 +318,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
{
|
{
|
||||||
// Custom Screen with numbers
|
// Custom Screen with numbers
|
||||||
uint8_t fields_count = 0;
|
uint8_t fields_count = 0;
|
||||||
|
bool isTimer = 0;
|
||||||
lcdDrawSolidVerticalLine(63, 8, 48);
|
lcdDrawSolidVerticalLine(63, 8, 48);
|
||||||
for (uint8_t i=0; i<4; i++) {
|
for (uint8_t i=0; i<4; i++) {
|
||||||
for (uint8_t j=0; j<NUM_LINE_ITEMS; j++) {
|
for (uint8_t j=0; j<NUM_LINE_ITEMS; j++) {
|
||||||
@@ -337,6 +338,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
if (field >= MIXSRC_FIRST_TIMER && field <= MIXSRC_LAST_TIMER && i!=3) {
|
if (field >= MIXSRC_FIRST_TIMER && field <= MIXSRC_LAST_TIMER && i!=3) {
|
||||||
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
|
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
|
||||||
drawStringWithIndex(pos[j], 1+FH+2*FH*i, "T", field-MIXSRC_FIRST_TIMER+1, 0);
|
drawStringWithIndex(pos[j], 1+FH+2*FH*i, "T", field-MIXSRC_FIRST_TIMER+1, 0);
|
||||||
|
isTimer = 1;
|
||||||
}
|
}
|
||||||
else if (field >= MIXSRC_FIRST_TELEM && isGPSSensor(1+(field-MIXSRC_FIRST_TELEM)/3) && telemetryItems[(field-MIXSRC_FIRST_TELEM)/3].isAvailable()) {
|
else if (field >= MIXSRC_FIRST_TELEM && isGPSSensor(1+(field-MIXSRC_FIRST_TELEM)/3) && telemetryItems[(field-MIXSRC_FIRST_TELEM)/3].isAvailable()) {
|
||||||
// we don't display GPS name, no space for it
|
// we don't display GPS name, no space for it
|
||||||
@@ -355,10 +357,12 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
att |= INVERS|BLINK;
|
att |= INVERS|BLINK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME))
|
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && !isTimer) {
|
||||||
drawTelemScreenDate(pos[j+1]-36, 6+FH+2*FH*i, field, SMLSIZE|NO_UNIT);
|
drawTelemScreenDate(pos[j+1]-36, 6+FH+2*FH*i, field, SMLSIZE|NO_UNIT);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
drawSourceValue(pos[j+1]-2, (i==3 ? 1+FH+2*FH*i:FH+2*FH*i), field, att);
|
drawSourceValue(pos[j+1]-2, (i==3 ? 1+FH+2*FH*i:FH+2*FH*i), field, att);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
{
|
{
|
||||||
// Custom Screen with numbers
|
// Custom Screen with numbers
|
||||||
const coord_t pos[] = {0, 71, 143, 214};
|
const coord_t pos[] = {0, 71, 143, 214};
|
||||||
|
bool isTimer = 0;
|
||||||
uint8_t fields_count = 0;
|
uint8_t fields_count = 0;
|
||||||
lcdDrawSolidVerticalLine(69, 8, 48);
|
lcdDrawSolidVerticalLine(69, 8, 48);
|
||||||
lcdDrawSolidVerticalLine(141, 8, 48);
|
lcdDrawSolidVerticalLine(141, 8, 48);
|
||||||
@@ -120,6 +121,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
if (field >= MIXSRC_FIRST_TIMER && field <= MIXSRC_LAST_TIMER && i!=3) {
|
if (field >= MIXSRC_FIRST_TIMER && field <= MIXSRC_LAST_TIMER && i!=3) {
|
||||||
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
|
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2" and still see the - sign, we write "T1" or "T2" instead
|
||||||
drawStringWithIndex(pos[j], 1+FH+2*FH*i, "T", field-MIXSRC_FIRST_TIMER+1, 0);
|
drawStringWithIndex(pos[j], 1+FH+2*FH*i, "T", field-MIXSRC_FIRST_TIMER+1, 0);
|
||||||
|
isTimer = 1;
|
||||||
if (timersStates[field-MIXSRC_FIRST_TIMER].val > 3600) {
|
if (timersStates[field-MIXSRC_FIRST_TIMER].val > 3600) {
|
||||||
att += TIMEHOUR - DBLSIZE;
|
att += TIMEHOUR - DBLSIZE;
|
||||||
x -= 3*FW;
|
x -= 3*FW;
|
||||||
@@ -144,7 +146,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME)) {
|
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && !isTimer) {
|
||||||
drawTelemScreenDate(x, y, field, att);
|
drawTelemScreenDate(x, y, field, att);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user