RelaysData constructor

RelaysData({
  1. BoolState? backLeftMotor,
  2. BoolState? backRightMotor,
  3. BoolState? frontLeftMotor,
  4. BoolState? frontRightMotor,
  5. BoolState? arm,
  6. BoolState? science,
  7. BoolState? drive,
  8. BoolState? bypass,
  9. BoolState? mechanicalOverride,
})

Implementation

factory RelaysData({
  $0.BoolState? backLeftMotor,
  $0.BoolState? backRightMotor,
  $0.BoolState? frontLeftMotor,
  $0.BoolState? frontRightMotor,
  $0.BoolState? arm,
  $0.BoolState? science,
  $0.BoolState? drive,
  $0.BoolState? bypass,
  $0.BoolState? mechanicalOverride,
}) {
  final $result = create();
  if (backLeftMotor != null) {
    $result.backLeftMotor = backLeftMotor;
  }
  if (backRightMotor != null) {
    $result.backRightMotor = backRightMotor;
  }
  if (frontLeftMotor != null) {
    $result.frontLeftMotor = frontLeftMotor;
  }
  if (frontRightMotor != null) {
    $result.frontRightMotor = frontRightMotor;
  }
  if (arm != null) {
    $result.arm = arm;
  }
  if (science != null) {
    $result.science = science;
  }
  if (drive != null) {
    $result.drive = drive;
  }
  if (bypass != null) {
    $result.bypass = bypass;
  }
  if (mechanicalOverride != null) {
    $result.mechanicalOverride = mechanicalOverride;
  }
  return $result;
}