Skip to content

Commit

Permalink
SEQNG-521 Fixed bug with channel used to set focus mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
jluhrs committed Feb 8, 2018
1 parent 4d7a888 commit 08b303b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</parameter>
<parameter name="focus">
<channel>cc:focusStepsCad.A</channel>
<type>STRING</type>
<type>INTEGER</type>
<description>Focus</description>
</parameter>
<parameter name="tilt">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ object GnirsControllerEpics extends GnirsController {
setSpectrographyComponents(config.mode, config.camera) ++
smartSetParam(encode(config.camera), epicsSys.camera.map(removePartName), ccCmd.setCamera(encode(config.camera)))
// Force focus configuration if any of the above is set
val focusSet = if (epicsSys.focus =/= focus.some || !refocusParams.isEmpty) List(ccCmd.setFocus(focus)) else Nil
val focusSet = if (!refocusParams.isEmpty) List(ccCmd.setFocusBest(focus)) else Nil

smartSetParam(open, epicsSys.cover.map(removePartName), ccCmd.setCover(open)) ++
refocusParams ++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class GnirsEpics(epicsService: CaService, tops: Map[String, String]) {
val filter2: Option[CaParameter[String]] = cs.map(_.getString("filter2"))
def setFilter2(v: String): SeqAction[Unit] = setParameter(filter2, v)

val focus: Option[CaParameter[String]] = cs.map(_.getString("focus"))
def setFocus(v: String): SeqAction[Unit] = setParameter(focus, v)
val focus: Option[CaParameter[Integer]] = cs.map(_.getInteger("focus"))
def setFocus(v: Int): SeqAction[Unit] = setParameter(focus, Integer.valueOf(v))

val tilt: Option[CaParameter[String]] = cs.map(_.getString("tilt"))
def setTilt(v: String): SeqAction[Unit] = setParameter(tilt, v)
Expand Down

0 comments on commit 08b303b

Please sign in to comment.