Skip to content

Commit

Permalink
Merge pull request #905 from gemini-hlsw/daytime-optional
Browse files Browse the repository at this point in the history
Make dayTimeMode optional
  • Loading branch information
cquiroz committed Jun 10, 2024
2 parents 3a9e9c7 + 16a83db commit 5ba572d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / tlBaseVersion := "0.98"
ThisBuild / tlBaseVersion := "0.99"
ThisBuild / tlCiReleaseBranches := Seq("master")
ThisBuild / githubWorkflowEnv += "MUNIT_FLAKY_OK" -> "true"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object GuideConfig {
MountGuideOption.MountGuideOff,
M1GuideOff,
M2GuideOff,
false,
None,
None),
None,
)
Expand Down Expand Up @@ -230,7 +230,7 @@ object GuideConfig {
given Encoder[ProbeGuide] = Encoder.forProduct2("from", "to")(x => (x.from, x.to))

given Decoder[TelescopeGuideConfig] =
Decoder.forProduct5[TelescopeGuideConfig, MountGuideOption, M1GuideConfig, M2GuideConfig, Boolean, Option[ProbeGuide]](
Decoder.forProduct5[TelescopeGuideConfig, MountGuideOption, M1GuideConfig, M2GuideConfig, Option[Boolean], Option[ProbeGuide]](
"mountGuideOn",
"m1Guide",
"m2Guide",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case class TelescopeGuideConfig(
mountGuide: MountGuideOption,
m1Guide: M1GuideConfig,
m2Guide: M2GuideConfig,
dayTimeMode: Boolean,
dayTimeMode: Option[Boolean], // This should not be an Option but we make it optional for backward compatibility with TCC
probeGuide: Option[ProbeGuide]
) derives Eq

Expand All @@ -28,7 +28,7 @@ object TelescopeGuideConfig {
val m2Guide: Lens[TelescopeGuideConfig, M2GuideConfig] =
Focus[TelescopeGuideConfig](_.m2Guide)

val dayTimeMode: Lens[TelescopeGuideConfig, Boolean] =
val dayTimeMode: Lens[TelescopeGuideConfig, Option[Boolean]] =
Focus[TelescopeGuideConfig](_.dayTimeMode)

val probeGuide: Lens[TelescopeGuideConfig, Option[ProbeGuide]] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ trait ArbTelescopeGuideConfig {
mo <- arbitrary[MountGuideOption]
m1 <- arbitrary[M1GuideConfig]
m2 <- arbitrary[M2GuideConfig]
m <- arbitrary[Boolean]
m <- arbitrary[Option[Boolean]]
pg <- arbitrary[Option[ProbeGuide]]
} yield TelescopeGuideConfig(mo, m1, m2, m, pg)
}

given Cogen[TelescopeGuideConfig] =
Cogen[(Boolean, M1GuideConfig, M2GuideConfig, Boolean, Option[ProbeGuide])]
Cogen[(Boolean, M1GuideConfig, M2GuideConfig, Option[Boolean], Option[ProbeGuide])]
.contramap(x => (x.mountGuide.value, x.m1Guide, x.m2Guide, x.dayTimeMode, x.probeGuide))
}

Expand Down

0 comments on commit 5ba572d

Please sign in to comment.