Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • solar_fsm keeps track of the state of the module. It transitions on fault events (and possibly commands from centre console, if those exist) and dispatches “action” events to interface with relay and calls the SPV1020 driver mppt to turn on/off the MPPTs. (This could be split off into multiple FSMs to handle specific fault sequences. Also, we could just call relay from solar_fsm instead of raising an action event if the relay logic is simple enough.)

  • relay will handle opening and closing the relay when it receives an appropriate action event. It will interface with the DRV120 driver.

Other:

  • mppt is a thin wrapper over the spv1020_mppt driver which handles dealing with the demux to support addressing multiple SPV1020s. It should provide the same functions as spv1020_mppt, but with an extra argument specifying which MPPT the command should go to; it’ll then set the demux to address that MPPT, then call the corresponding spv1020_mppt function. It should use the existing generic mux driver.

    • This isn’t a driver because the fact that our SPV1020s are behind a demux is an implementation detail of the board which isn’t appropriate for a generic driver to deal with. This module encapsulates the interaction between the MPPTs and the demux.

Drivers

...