RoverControls.forMode constructor

RoverControls.forMode(
  1. OperatingMode mode
)

Creates the appropriate RoverControls for this mode.

Implementation

factory RoverControls.forMode(OperatingMode mode) => switch (mode) {
    OperatingMode.arm => ArmControls(),
    OperatingMode.science => ScienceControls(),
    OperatingMode.drive => DriveControls(),
    OperatingMode.none => NoControls(),
    OperatingMode.cameras => CameraControls(),
    OperatingMode.modernDrive => ModernDriveControls(),
};