Subversion Repositories DashDisplay

Rev

Rev 61 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61 Rev 62
Line 56... Line 56...
56
#endif
56
#endif
57
        static void
57
        static void
58
        showMinMax(display_t &display, uint8_t dp_pos, int16_t int_min,
58
        showMinMax(display_t &display, uint8_t dp_pos, int16_t int_min,
59
                           uint16_t int_max)
59
                           uint16_t int_max)
60
        {
60
        {
-
 
61
                const char padding[]="      ";
-
 
62
                // left justified display of minimum 
61
                display.fontSigDigits(small_font, 0, 0, 0, dp_pos, int_min, WHITE);
63
                int8_t width=display.fontSigDigits(small_font, 0, 0, 0, dp_pos, int_min, WHITE);
-
 
64
                // pad with spaces if fewer than 6 characters are used. 
-
 
65
                if(width !=6)
-
 
66
                        display.printString(small_font,padding,6-width,WHITE);
-
 
67
               
62
                display.gotoxy(0, 8);
68
                display.gotoxy(0, 8);
63
 
-
 
64
                display.printString(small_font, "Min", 3, WHITE);
69
                display.printString(small_font, "Min", 3, WHITE);
65
 
70
 
-
 
71
                // right justified display of maximum
66
                display.fontSigDigits(small_font, 120, 0, 1, dp_pos, int_max, WHITE);
72
                width = display.fontSigDigits(small_font, 120, 0, 1, dp_pos, int_max, WHITE);
-
 
73
                // right justified display of maximum : pad spaces to left
-
 
74
                if(width !=6)
-
 
75
                {
-
 
76
                   display.moveby((width-6)*small_font.width(),0);
-
 
77
                   display.printString(small_font,padding,6-width,WHITE);
-
 
78
                }
-
 
79
 
67
                display.gotoxy(110, 8);
80
                display.gotoxy(110, 8);
68
                display.printString(small_font, "Max", 3, WHITE);
81
                display.printString(small_font, "Max", 3, WHITE);
69
        }
82
        }
70
 
83
 
71
        void
84
        void