]> mj.ucw.cz Git - home-hw.git/blobdiff - aircon/firmware/main.c
Auto: Meditation mode turned off
[home-hw.git] / aircon / firmware / main.c
index c43012162caa840a9e01da1c7958b17017bc8fcb..da9df476d2e6403e1fc47cf0d726e2e5f47285d1 100644 (file)
@@ -198,6 +198,7 @@ int main(void)
 
                modbus_loop();
 
+#if 0
                if (usart_get_flag(USART1, USART_SR_RXNE)) {
                        uint ch = usart_recv(USART1);
                        if (ch == 'B') {
@@ -230,6 +231,7 @@ int main(void)
                                rc_send(ch);
                        }
                }
+#endif
 
                if (ms_ticks - last_show_temp >= 5000) {
                        show_temperature();
@@ -347,6 +349,8 @@ static bool rc_send(char key)
 {
        if (rc_pending)
                return false;
+       if (!key)
+               return false;
 
        const char *s = strchr(rc_keys, key);
        if (!s)