modbus_loop();
+#if 0
if (usart_get_flag(USART1, USART_SR_RXNE)) {
uint ch = usart_recv(USART1);
if (ch == 'B') {
rc_send(ch);
}
}
+#endif
if (ms_ticks - last_show_temp >= 5000) {
show_temperature();
{
if (rc_pending)
return false;
+ if (!key)
+ return false;
const char *s = strchr(rc_keys, key);
if (!s)
return false;
rc_pending = key;
rc_pattern_pos = rc_patterns[s - rc_keys];
- debug_printf("RC sending: %c", key);
+ debug_printf("RC sending: %c\n", key);
gpio_clear(GPIOC, GPIO13);