-
-
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.
- Loading branch information
Showing
239 changed files
with
5,468 additions
and
1,840 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.PHONY: build install | ||
|
||
build: | ||
./gradlew api:bootJar | ||
cd desktop && npm run electron:build:deb | ||
|
||
install: | ||
sudo dpkg -i desktop/release/nebulosa_0.1.0_amd64.deb |
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
5 changes: 3 additions & 2 deletions
5
api/src/main/kotlin/nebulosa/api/alignment/polar/darv/DARVJob.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,13 +1,14 @@ | ||
package nebulosa.api.alignment.polar.darv | ||
|
||
import nebulosa.api.cameras.CameraEventAware | ||
import nebulosa.api.tasks.Job | ||
import nebulosa.indi.device.camera.CameraEvent | ||
|
||
data class DARVJob(override val task: DARVTask) : Job() { | ||
data class DARVJob(override val task: DARVTask) : Job(), CameraEventAware { | ||
|
||
override val name = "${task.camera.name} DARV Job" | ||
|
||
fun handleCameraEvent(event: CameraEvent) { | ||
override fun handleCameraEvent(event: CameraEvent) { | ||
task.handleCameraEvent(event) | ||
} | ||
} |
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
5 changes: 3 additions & 2 deletions
5
api/src/main/kotlin/nebulosa/api/alignment/polar/tppa/TPPAJob.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,13 +1,14 @@ | ||
package nebulosa.api.alignment.polar.tppa | ||
|
||
import nebulosa.api.cameras.CameraEventAware | ||
import nebulosa.api.tasks.Job | ||
import nebulosa.indi.device.camera.CameraEvent | ||
|
||
data class TPPAJob(override val task: TPPATask) : Job() { | ||
data class TPPAJob(override val task: TPPATask) : Job(), CameraEventAware { | ||
|
||
override val name = "${task.camera.name} TPPA Job" | ||
|
||
fun handleCameraEvent(event: CameraEvent) { | ||
override fun handleCameraEvent(event: CameraEvent) { | ||
task.handleCameraEvent(event) | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
api/src/main/kotlin/nebulosa/api/autofocus/AutoFocusController.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package nebulosa.api.autofocus | ||
|
||
import nebulosa.indi.device.camera.Camera | ||
import nebulosa.indi.device.focuser.Focuser | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@RestController | ||
@RequestMapping("auto-focus") | ||
class AutoFocusController(private val autoFocusService: AutoFocusService) { | ||
|
||
@PutMapping("{camera}/{focuser}/start") | ||
fun start( | ||
camera: Camera, focuser: Focuser, | ||
@RequestBody body: AutoFocusRequest, | ||
) = autoFocusService.start(camera, focuser, body) | ||
|
||
@PutMapping("{camera}/stop") | ||
fun stop(camera: Camera) = autoFocusService.stop(camera) | ||
|
||
@GetMapping("{camera}/status") | ||
fun status(camera: Camera) = autoFocusService.status(camera) | ||
} |
32 changes: 32 additions & 0 deletions
32
api/src/main/kotlin/nebulosa/api/autofocus/AutoFocusEvent.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package nebulosa.api.autofocus | ||
|
||
import nebulosa.api.cameras.CameraCaptureEvent | ||
import nebulosa.api.messages.MessageEvent | ||
import nebulosa.curve.fitting.CurvePoint | ||
import nebulosa.curve.fitting.HyperbolicFitting | ||
import nebulosa.curve.fitting.QuadraticFitting | ||
import nebulosa.curve.fitting.TrendLineFitting | ||
|
||
data class AutoFocusEvent( | ||
@JvmField val state: AutoFocusState = AutoFocusState.IDLE, | ||
@JvmField val focusPoint: CurvePoint? = null, | ||
@JvmField val determinedFocusPoint: CurvePoint? = null, | ||
@JvmField val starCount: Int = 0, | ||
@JvmField val starHFD: Double = 0.0, | ||
@JvmField val chart: Chart? = null, | ||
@JvmField val capture: CameraCaptureEvent? = null, | ||
) : MessageEvent { | ||
|
||
data class Chart( | ||
@JvmField val predictedFocusPoint: CurvePoint? = null, | ||
@JvmField val minX: Double = 0.0, | ||
@JvmField val minY: Double = 0.0, | ||
@JvmField val maxX: Double = 0.0, | ||
@JvmField val maxY: Double = 0.0, | ||
@JvmField val trendLine: TrendLineFitting.Curve? = null, | ||
@JvmField val parabolic: QuadraticFitting.Curve? = null, | ||
@JvmField val hyperbolic: HyperbolicFitting.Curve? = null, | ||
) | ||
|
||
override val eventName = "AUTO_FOCUS.ELAPSED" | ||
} |
Oops, something went wrong.