fix beep when beacon is detected
[beacon-rx-433.git] / main.c
diff --git a/main.c b/main.c
index 1a9b01e..d60f4a8 100644 (file)
--- a/main.c
+++ b/main.c
@@ -330,7 +330,7 @@ static uint8_t get_input(int i)
 #ifdef HOST_VERSION
        return !!x[i];
 #else
-       return !!(PINB & RADIO_BIT);
+       return !!(PINB & (1 << RADIO_BIT));
 #endif
 }
 
@@ -398,8 +398,8 @@ int main(void)
 
                set_output(i);
 
-#ifdef HOST_VERSION
                i ++;
+#ifdef HOST_VERSION
                if (i >= sizeof(x))
                        break;
 #endif