We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb04b2d commit 799c040Copy full SHA for 799c040
firmware/Core/Src/main.c
@@ -143,15 +143,16 @@ void temp_timer(){
143
sprintf(tmp_str, "%lu.0\t", HAL_GetTick());
144
strcat(tsv_str, tmp_str);
145
for(uint8_t i = 0; i <=3; i++){
146
- if(tp[i] < 2045){
147
- led_set(i, STATE_GREEN);
148
- } else {
149
- led_set(i, STATE_RED);
150
- }
151
char tmp_str[24];
152
sprintf(tmp_str, "%.4f\t", tp[i]);
153
154
}
+
+ led_set(LED0, tp[3] < 2045 ? STATE_GREEN : STATE_RED);
+ led_set(LED1, tp[2] < 2045 ? STATE_GREEN : STATE_RED);
+ led_set(LED2, tp[1] < 2045 ? STATE_GREEN : STATE_RED);
+ led_set(LED3, tp[0] < 2045 ? STATE_GREEN : STATE_RED);
155
156
strcat(tsv_str, "\n");
157
CDC_Transmit_FS((uint8_t *) &tsv_str, sizeof tsv_str);
158
0 commit comments