fix slight bug in non-defined options
authorjweigele <jweigele@local>
Tue, 26 Mar 2024 19:41:11 +0000 (12:41 -0700)
committerjweigele <jweigele@local>
Tue, 26 Mar 2024 19:41:11 +0000 (12:41 -0700)
aqi/main/aqi.c

index 0acaad10cf015042265f9f8028ac422906e29f49..e2873db2e505f5f910fac4d63bdd3cdf17f92ad7 100644 (file)
@@ -1389,6 +1389,7 @@ static void motion_task(void* discard){
             // block, but probably better than dropping events on the floor?? really don't want to be in that situation
             // to begin with
             switch (io_num) {
+#ifdef CONFIG_MOTION_FIRST_PIN                
                 case CONFIG_MOTION_FIRST_PIN:
                     prev_motion[0] = motion_pins[0];
                     motion_pins[0] = pin_value;
@@ -1396,6 +1397,8 @@ static void motion_task(void* discard){
                         xQueueSend(check_queue, &io_num, portMAX_DELAY);      
                     }
                     break;
+#endif                    
+#ifdef CONFIG_MOTION_SECOND_PIN                    
                 case CONFIG_MOTION_SECOND_PIN:
                     prev_motion[1] = motion_pins[1];
                     motion_pins[1] = pin_value;
@@ -1403,6 +1406,7 @@ static void motion_task(void* discard){
                         xQueueSend(check_queue, &io_num, portMAX_DELAY); 
                     }
                     break;
+#endif                    
                 default:
                     printf("Unable to set motion pins!\n");
             }