Skip to content

os: Blink/flash/fade the sample illumination LED during bootup #437

@ethanjli

Description

@ethanjli

Is your feature request related to a problem? Please describe.
When the OS boots up, we don't have adequate indicators about the state of the boot, the liveness of the OS, and the readiness of the application software. Currently, we just have a quick blink of the sample illumination LED during boot, but no other indicators to the user. The v2.1 hardware (with the fan HAT with an optional attached I2C LCD display) can display text indicators, but the v2.3/v2.5/v2.6 hardware has no ability to display indicators beyond controlling the sample illumination LED. As a result, machine operators don't have any sense of what is happening after they turn on power to the machine.

Describe the solution you'd like
We should control the sample illumination LED to show different outputs to the operator during different phases of boot, e.g.:

  • Early boot (maybe after systemd-remount-fs.service): the LED blinks slowly (~0.5 Hz) until the next stage; this starts ~4 s into boot
  • Basic bootup is complete (i.e. after basic.target): the LED blinks moderately (~2 Hz) until the next stage; this starts ~12 s into boot
  • Docker is ready (i.e. after docker.service): the LED flashes quickly (~8 Hz?) until planktoscope-org.device-backend.controller-*.service; this starts ~25 s into boot
  • Hardware controller has started (i.e. after planktoscope-org.device-backend.controller-*.service): the LED stays on; this starts ~42 s into boot (implementing this indicator should be done as described in backend/hardware-controller: Turn the sample illumination LED on by default at startup #211)

Note: timing estimates come from #416 (comment)

We can stop one unit when starting another by adding a Conflicts= directive to the respective unit definitions.

Any indicator signals we want to expose to the user after the hardware controller has started should not be done with the sample illumination LED; those should be indicated by other LEDs added in future hardware versions.

Describe alternatives you've considered
#211 suggests turning on the sample illumination LED at some point during boot (I would suggest doing that when the Python hardware controller starts). However, it doesn't provide indicators for other critical moments during boot.

In the 2024-06-20 software meeting, an idea was raised to move the pump and/or focusing motors as part of bootup. However, if the machine crashed/froze in the middle of sample image acquisition and had to be rebooted, moving the actuators would mess up the sample acquisition. It would be better to only do things on the illumination LED to as a boot indiccator.

Additional context
This feature was first requested by @tpollina in a discussion in the 2024-06-20 software meeting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions