Merge pull request #5318 from opentx/3djc/more-datetime-fixes
Fix datetime
This commit is contained in:
@@ -318,7 +318,6 @@ 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++) {
|
||||||
@@ -338,7 +337,6 @@ 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
|
||||||
@@ -357,7 +355,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
att |= INVERS|BLINK;
|
att |= INVERS|BLINK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && !isTimer) {
|
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && field >= MIXSRC_FIRST_TELEM) {
|
||||||
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 {
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ 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);
|
||||||
@@ -121,7 +120,6 @@ 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;
|
||||||
@@ -146,7 +144,7 @@ bool displayNumbersTelemetryScreen(FrSkyScreenData & screen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && !isTimer) {
|
if(isSensorUnit(1+(field-MIXSRC_FIRST_TELEM)/3, UNIT_DATETIME) && field >= MIXSRC_FIRST_TELEM) {
|
||||||
drawTelemScreenDate(x, y, field, att);
|
drawTelemScreenDate(x, y, field, att);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user