All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lucuma.core.model.M2GuideConfig.scala Maven / Gradle / Ivy

There is a newer version: 0.108.0
Show newest version
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.core.model

import cats.*
import cats.derived.*
import cats.syntax.all.*
import lucuma.core.enums.ComaOption
import lucuma.core.enums.TipTiltSource

/** Data type for M2 guide config. */
sealed trait M2GuideConfig extends Product with Serializable derives Eq {
  def uses(s: TipTiltSource): Boolean
}

object M2GuideConfig {
  case object M2GuideOff extends M2GuideConfig derives Eq, Show {
    override def uses(s: TipTiltSource): Boolean = false
  }

  case class M2GuideOn(coma: ComaOption, sources: Set[TipTiltSource]) extends M2GuideConfig derives Eq {
    override def uses(s: TipTiltSource): Boolean = sources.contains(s)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy