-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api][desktop]: Fixes & improvements
- Loading branch information
Showing
65 changed files
with
562 additions
and
671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
api/src/main/kotlin/nebulosa/api/alignment/polar/darv/DARVStartRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package nebulosa.api.alignment.polar.darv | ||
|
||
import jakarta.validation.Valid | ||
import nebulosa.api.cameras.CameraStartCaptureRequest | ||
import nebulosa.api.javalin.Validatable | ||
import nebulosa.guiding.GuideDirection | ||
|
||
data class DARVStartRequest( | ||
@JvmField @field:Valid val capture: CameraStartCaptureRequest = CameraStartCaptureRequest.EMPTY, | ||
@JvmField val capture: CameraStartCaptureRequest = CameraStartCaptureRequest.EMPTY, | ||
@JvmField val direction: GuideDirection = GuideDirection.NORTH, | ||
@JvmField val reversed: Boolean = false, | ||
) | ||
) : Validatable { | ||
|
||
override fun validate() { | ||
capture.validate() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 13 additions & 7 deletions
20
api/src/main/kotlin/nebulosa/api/alignment/polar/tppa/TPPAStartRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
package nebulosa.api.alignment.polar.tppa | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties | ||
import jakarta.validation.Valid | ||
import jakarta.validation.constraints.NotNull | ||
import nebulosa.api.beans.converters.time.DurationUnit | ||
import nebulosa.api.cameras.CameraStartCaptureRequest | ||
import nebulosa.api.javalin.Validatable | ||
import nebulosa.api.javalin.min | ||
import nebulosa.api.platesolver.PlateSolverRequest | ||
import nebulosa.guiding.GuideDirection | ||
import org.hibernate.validator.constraints.time.DurationMin | ||
import java.time.Duration | ||
import java.time.temporal.ChronoUnit | ||
import java.util.concurrent.TimeUnit | ||
|
||
data class TPPAStartRequest( | ||
@JsonIgnoreProperties("camera", "focuser", "wheel") @JvmField val capture: CameraStartCaptureRequest = CameraStartCaptureRequest.EMPTY, | ||
@field:NotNull @Valid @JvmField val plateSolver: PlateSolverRequest = PlateSolverRequest.EMPTY, | ||
@JvmField val plateSolver: PlateSolverRequest = PlateSolverRequest.EMPTY, | ||
@JvmField val startFromCurrentPosition: Boolean = true, | ||
@JvmField val compensateRefraction: Boolean = false, | ||
@JvmField val stopTrackingWhenDone: Boolean = true, | ||
@field:DurationMin(seconds = 1L) @JvmField val stepDirection: GuideDirection = GuideDirection.EAST, | ||
@field:DurationUnit(ChronoUnit.SECONDS) @field:DurationMin(seconds = 1L) @JvmField val stepDuration: Duration = Duration.ZERO, | ||
@JvmField val stepDirection: GuideDirection = GuideDirection.EAST, | ||
@field:DurationUnit(ChronoUnit.SECONDS) @JvmField val stepDuration: Duration = Duration.ZERO, | ||
@JvmField val stepSpeed: String? = null, | ||
) | ||
) : Validatable { | ||
|
||
override fun validate() { | ||
plateSolver.validate() | ||
stepDuration.min(1L, TimeUnit.SECONDS) | ||
} | ||
} |
Oops, something went wrong.