Subversion Repositories testOled

Rev

Rev 8 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 10
Line 26... Line 26...
26
 
26
 
27
        int x = 500;
27
        int x = 500;
28
        int y = 20;
28
        int y = 20;
29
        int ph = 0;
29
        int ph = 0;
30
 
30
 
-
 
31
        uint32_t press;
-
 
32
        int32_t temp;
31
}
33
}
32
 
34
 
33
uint8_t displayBuffer[2][dataSize(WIDTH, HEIGHT)];
35
uint8_t displayBuffer[2][dataSize(WIDTH, HEIGHT)];
34
 
36
 
35
stm32_halDisplay_t displays[MAX_DISPLAYS] =
37
stm32_halDisplay_t displays[MAX_DISPLAYS] =
Line 102... Line 104...
102
 
104
 
103
                        x = 500;
105
                        x = 500;
104
                }
106
                }
105
                display.dim(false);
107
                display.dim(false);
106
                char buff[10];
108
                char buff[10];
107
                char buff1[10];
-
 
108
                char buff2[10];
-
 
109
                small_sprintf(buff1, "x=%4d", x);
-
 
110
                small_sprintf(buff2, "y=%4d", y);
-
 
111
                int tim = timing(x, 1000 - y);
109
                int tim = timing(x, 1000 - y);
112
                small_sprintf(buff, "%2d.%1d\xb0", tim / 10, tim % 10);
110
                small_sprintf(buff, "%2d.%1d\xb0", tim / 10, tim % 10);
113
 
111
 
114
        //      dispXY.plotPoint(x, y, buff, buff1, buff2);
112
                //      dispXY.plotPoint(x, y, buff, buff1, buff2);
115
 
113
 
116
                displayDial1.draw_value(buff2);
-
 
117
                displayDial2.draw_value(buff1);
-
 
118
 
-
 
119
                displayDial1.draw_limits();
114
                displayDial1.draw_limits();
120
                displayDial2.draw_limits();
115
                displayDial2.draw_limits();
121
 
116
 
-
 
117
                displayDial1.set_units("degC");
-
 
118
                displayDial2.set_units("slide");
-
 
119
 
122
                displayDial1.draw_needle(y / 3);
120
                displayDial1.draw_value(temp, 1);
-
 
121
                displayDial1.draw_needle(temp * 360 / 10000);
-
 
122
                displayDial2.draw_value(y, display_t::NO_DECIMAL);
123
                displayDial2.draw_needle(y / 3);
123
                displayDial2.draw_needle(y / 3);
124
 
124
 
125
                display.dim(true);
125
                display.dim(true);
126
                display.display();
126
                display.display();
127
 
127
 
128
                return 0;
128
                return 0;
129
        }
129
        }
130
 
130
 
-
 
131
        void cc_feed(uint32_t pressVal, int32_t tempVal)
-
 
132
        {
-
 
133
                press = pressVal;
-
 
134
                temp = tempVal;
-
 
135
        }
131
#if defined __cplusplus
136
#if defined __cplusplus
132
}
137
}
133
#endif
138
#endif