浏览代码

Don't wait for LED blink on boot.

Previously 500 ms of the boot was spent on the "all ok" LED blink wait.
Now the LED is kept on for the duration of initialization + 100 ms.
Results in similar blink as before but cuts boot time by 400 ms.
Petteri Aimonen 2 年之前
父节点
当前提交
44a2dd8a89
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/BlueSCSI.cpp

+ 6 - 2
src/BlueSCSI.cpp

@@ -535,8 +535,9 @@ static void reinitSCSI()
   // Error if there are 0 image files
   // Error if there are 0 image files
   if (scsiDiskCheckAnyImagesConfigured())
   if (scsiDiskCheckAnyImagesConfigured())
   {
   {
-    // Ok, there is an image
-    blinkStatus(BLINK_STATUS_OK);
+    // Ok, there is an image, turn LED on for the time it takes to perform init
+    LED_ON();
+    delay(100);
   }
   }
   else
   else
   {
   {
@@ -611,6 +612,9 @@ extern "C" void bluescsi_setup(void)
       platform_disable_led();
       platform_disable_led();
     }
     }
   }
   }
+
+  // Counterpart for the LED_ON in reinitSCSI().
+  LED_OFF();
 }
 }
 
 
 extern "C" void bluescsi_main_loop(void)
 extern "C" void bluescsi_main_loop(void)