comparison Discovery/Src/t3.c @ 755:92bf7bf9fb8a

Cleanup display of multiple warnings in T3 (Big font) view: In a very early version a list of possible warnings was shown and the active once highlithed in red. Because of the rising number of warnings and the big visualization of the first warning (double size) a erronous mixed warning list was displayed. This has now been cleaned up. The main warning is still be displayed in double size but the following warnings are shown on the right side in normal fornt size.
author Ideenmodellierer
date Tue, 07 Mar 2023 19:59:02 +0100
parents 4a6bffaa38b3
children b6d8a6fbf4fd
comparison
equal deleted inserted replaced
754:ec7b62983a8c 755:92bf7bf9fb8a
1526 more = 0; 1526 more = 0;
1527 1527
1528 textpointerMain = 0; 1528 textpointerMain = 0;
1529 textMain[textpointerMain++] = '\025'; /* red */ 1529 textMain[textpointerMain++] = '\025'; /* red */
1530 textMain[textpointerMain++] = '\003'; /* doublesize */ 1530 textMain[textpointerMain++] = '\003'; /* doublesize */
1531 textMain[textpointerMain++] = TXT_2BYTE; /* There is only one Main warning to be displayed */
1531 1532
1532 textpointer = 0; 1533 textpointer = 0;
1533 1534 text[textpointer++] = '\025'; /* red */
1534 text[textpointer++] = '\031'; 1535
1535 text[textpointer++] = TXT_2BYTE;
1536 text[textpointer++] = TXT2BYTE_WarnDecoMissed;
1537 if(stateUsed->warnings.decoMissed) 1536 if(stateUsed->warnings.decoMissed)
1538 { 1537 {
1539 text[textpointer - 3] = '\025';
1540 if(lineFree) 1538 if(lineFree)
1541 { 1539 {
1542 textMain[textpointerMain++] = TXT_2BYTE; 1540 textMain[textpointerMain++] = TXT2BYTE_WarnDecoMissed;
1543 textMain[textpointerMain++] = text[textpointer - 1];
1544 textMain[textpointerMain] = 0;
1545 lineFree--; 1541 lineFree--;
1546 } 1542 }
1547 else 1543 else
1548 { 1544 {
1545 text[textpointer++] = '\002';
1546 text[textpointer++] = TXT_2BYTE;
1547 text[textpointer++] = TXT2BYTE_WarnDecoMissed;
1548 text[textpointer++] = '\r';
1549 text[textpointer++] = '\n';
1549 more++; 1550 more++;
1550 } 1551 }
1551 } 1552 }
1552 1553
1553 text[textpointer++] = '\t';
1554 text[textpointer++] = '\031';
1555 text[textpointer++] = TXT_2BYTE;
1556 text[textpointer++] = TXT2BYTE_WarnPPO2Low;
1557 if(stateUsed->warnings.ppO2Low) 1554 if(stateUsed->warnings.ppO2Low)
1558 { 1555 {
1559 text[textpointer - 3] = '\025';
1560 if(lineFree) 1556 if(lineFree)
1561 { 1557 {
1562 textMain[textpointerMain++] = TXT_2BYTE; 1558 textMain[textpointerMain++] = TXT2BYTE_WarnPPO2Low;
1563 textMain[textpointerMain++] = text[textpointer - 1];
1564 textMain[textpointerMain] = 0;
1565 lineFree--; 1559 lineFree--;
1566 } 1560 }
1567 else 1561 else
1568 { 1562 {
1563 text[textpointer++] = '\002';
1564 text[textpointer++] = TXT_2BYTE;
1565 text[textpointer++] = TXT2BYTE_WarnPPO2Low;
1566 text[textpointer++] = '\r';
1567 text[textpointer++] = '\n';
1569 more++; 1568 more++;
1570 } 1569 }
1571 } 1570 }
1572 1571
1573 text[textpointer++] = '\n';
1574 text[textpointer++] = '\r';
1575 text[textpointer++] = '\031';
1576 text[textpointer++] = TXT_2BYTE;
1577 text[textpointer++] = TXT2BYTE_WarnPPO2High;
1578 if(stateUsed->warnings.ppO2High) 1572 if(stateUsed->warnings.ppO2High)
1579 { 1573 {
1580 text[textpointer - 3] = '\025';
1581 if(lineFree) 1574 if(lineFree)
1582 { 1575 {
1583 textMain[textpointerMain++] = TXT_2BYTE; 1576 textMain[textpointerMain++] = TXT2BYTE_WarnPPO2High;
1584 textMain[textpointerMain++] = text[textpointer - 1];
1585 textMain[textpointerMain] = 0;
1586 lineFree--; 1577 lineFree--;
1587 } 1578 }
1588 else 1579 else
1589 { 1580 {
1581 text[textpointer++] = '\002';
1582 text[textpointer++] = TXT_2BYTE;
1583 text[textpointer++] = TXT2BYTE_WarnPPO2High;
1584 text[textpointer++] = '\r';
1585 text[textpointer++] = '\n';
1590 more++; 1586 more++;
1591 } 1587 }
1592 } 1588 }
1593 1589
1594 text[textpointer++] = '\t';
1595 text[textpointer++] = '\031';
1596 text[textpointer++] = TXT_2BYTE;
1597 text[textpointer++] = TXT2BYTE_WarnFallback;
1598 if(stateUsed->warnings.fallback) 1590 if(stateUsed->warnings.fallback)
1599 { 1591 {
1600 text[textpointer - 3] = '\025';
1601 if(lineFree) 1592 if(lineFree)
1602 { 1593 {
1603 textMain[textpointerMain++] = TXT_2BYTE; 1594 textMain[textpointerMain++] = TXT2BYTE_WarnFallback;
1604 textMain[textpointerMain++] = text[textpointer - 1];
1605 textMain[textpointerMain] = 0;
1606 lineFree--; 1595 lineFree--;
1607 } 1596 }
1608 else 1597 else
1609 { 1598 {
1599 text[textpointer++] = '\002';
1600 text[textpointer++] = TXT_2BYTE;
1601 text[textpointer++] = TXT2BYTE_WarnFallback;
1602 text[textpointer++] = '\r';
1603 text[textpointer++] = '\n';
1610 more++; 1604 more++;
1611 } 1605 }
1612 } 1606 }
1613 1607
1614 text[textpointer++] = '\n';
1615 text[textpointer++] = '\r';
1616 text[textpointer++] = '\031';
1617 text[textpointer++] = TXT_2BYTE;
1618 text[textpointer++] = TXT2BYTE_WarnSensorLinkLost;
1619 if(stateUsed->warnings.sensorLinkLost) 1608 if(stateUsed->warnings.sensorLinkLost)
1620 { 1609 {
1621 text[textpointer - 3] = '\025';
1622 if(lineFree) 1610 if(lineFree)
1623 { 1611 {
1624 textMain[textpointerMain++] = TXT_2BYTE; 1612 textMain[textpointerMain++] = TXT2BYTE_WarnSensorLinkLost;
1625 textMain[textpointerMain++] = text[textpointer - 1];
1626 textMain[textpointerMain] = 0;
1627 lineFree--; 1613 lineFree--;
1628 } 1614 }
1629 else 1615 else
1630 { 1616 {
1617 text[textpointer++] = '\002';
1618 text[textpointer++] = TXT_2BYTE;
1619 text[textpointer++] = TXT2BYTE_WarnSensorLinkLost;
1620 text[textpointer++] = '\r';
1621 text[textpointer++] = '\n';
1631 more++; 1622 more++;
1632 } 1623 }
1633 } 1624 }
1634 1625
1635 /* 1626 if(stateUsed->warnings.co2High)
1636 text[textpointer++] = '\t'; 1627 {
1637 text[textpointer++] = '\031';
1638 text[textpointer++] = TXT_2BYTE;
1639 text[textpointer++] = TXT2BYTE_WarnBatteryLow;
1640 if(stateUsed->warnings.lowBattery)
1641 {
1642 text[textpointer - 3] = '\025';
1643 if(lineFree) 1628 if(lineFree)
1644 { 1629 {
1645 textMain[textpointerMain++] = TXT_2BYTE; 1630 textMain[textpointerMain++] = TXT2BYTE_WarnCO2High;
1646 textMain[textpointerMain++] = text[textpointer - 1]; 1631 }
1647 textMain[textpointerMain] = 0; 1632 else
1648 lineFree--; 1633 {
1649 } 1634 text[textpointer++] = '\002';
1650 else 1635 text[textpointer++] = TXT_2BYTE;
1651 { 1636 text[textpointer++] = TXT2BYTE_WarnCO2High;
1637 text[textpointer++] = '\r';
1638 text[textpointer++] = '\n';
1652 more++; 1639 more++;
1653 } 1640 }
1654 } 1641 }
1655 */ 1642
1656 text[textpointer] = 0; 1643 text[textpointer] = 0;
1657 /* 1644 textMain[textpointerMain] = 0;
1658 if(more) 1645
1659 { 1646 if(lineFree == 0)
1660 text[textpointer++] = '\002'; 1647 {
1661 text[textpointer++] = '+'; 1648 GFX_write_string(&FontT48,&t3c1,textMain,0);
1662 if(more < 10) 1649 }
1663 text[textpointer++] = '0' + more;
1664 else
1665 text[textpointer++] = 'X';
1666 text[textpointer] = 0;
1667 }
1668 */
1669 GFX_write_string(&FontT48,&t3c1,textMain,0);
1670 if(more) 1650 if(more)
1671 { 1651 {
1672 GFX_write_string(&FontT48,&t3c2,text,0); 1652 GFX_write_string(&FontT48,&t3c2,text,0);
1673 } 1653 }
1674 } 1654 }