Compare commits
1 Commits
master
...
fix/PKT8-c
Author | SHA1 | Date | |
---|---|---|---|
a34ee6a5be |
@ -9,4 +9,4 @@ This project build using [DataForge](http://www.inr.ru/~nozik/dataforge/) framew
|
||||
It is intended to fix this problem with public maven repository later.
|
||||
|
||||
# Requirements #
|
||||
Project requires JDK 16 in the system. GUI modules must be compiled on the target OS (linux on linux systems)
|
||||
Project requires JDK 8 with JavaFX for desktop controls (https://www.azul.com/downloads/?version=java-8-lts&package=jdk-fx)
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls", "javafx.web")
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
description = "A tornadofx based kotlin library"
|
||||
|
@ -7,7 +7,7 @@ apply plugin: 'kotlin'
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
if (!hasProperty('mainClass')) {
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls")
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
description = "dataforge-plots"
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls")
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
description = "jFreeChart plugin"
|
||||
|
@ -6,7 +6,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
apply plugin: 'application'
|
||||
@ -22,7 +22,7 @@ dependencies {
|
||||
}
|
||||
|
||||
application{
|
||||
mainClassName = "inr.numass.control.cryotemp.PKT8AppKt"
|
||||
mainClassName("inr.numass.control.cryotemp.PKT8App")
|
||||
}
|
||||
|
||||
task testDevice(dependsOn: classes, type: JavaExec) {
|
||||
|
@ -18,7 +18,6 @@ package inr.numass.control.cryotemp
|
||||
import hep.dataforge.meta.Meta
|
||||
import hep.dataforge.meta.MetaUtils
|
||||
import inr.numass.control.NumassControlApplication
|
||||
import javafx.application.Application
|
||||
import javafx.stage.Stage
|
||||
|
||||
/**
|
||||
@ -39,9 +38,3 @@ class PKT8App : NumassControlApplication<PKT8Device>() {
|
||||
.orElseThrow{RuntimeException("Temperature measurement configuration not found")}
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Application.launch(PKT8App::class.java)
|
||||
}
|
||||
|
||||
|
||||
|
@ -251,6 +251,10 @@ class PKT8Device(context: Context, meta: Meta) : PortSensor(context, meta) {
|
||||
// logger.warn("Trying to start measurement which is already started")
|
||||
// }
|
||||
|
||||
if(!connected.booleanValue){
|
||||
logger.info("Not connected, connecting...")
|
||||
connected.setAndWait(true)
|
||||
}
|
||||
|
||||
logger.info("Starting measurement")
|
||||
|
||||
|
@ -6,7 +6,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
version = "0.3.0"
|
||||
|
@ -5,14 +5,15 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
version = "0.4.0"
|
||||
|
||||
application{
|
||||
mainClassName = "inr.numass.control.msp.MspAppKt"
|
||||
if (!hasProperty('mainClass')) {
|
||||
ext.mainClass = 'inr.numass.control.msp.MspApp'
|
||||
}
|
||||
mainClassName = mainClass
|
||||
|
||||
|
||||
dependencies {
|
||||
|
@ -18,7 +18,6 @@ package inr.numass.control.msp
|
||||
import hep.dataforge.meta.Meta
|
||||
import hep.dataforge.meta.MetaUtils
|
||||
import inr.numass.control.NumassControlApplication
|
||||
import javafx.application.Application
|
||||
import javafx.stage.Stage
|
||||
|
||||
/**
|
||||
@ -40,9 +39,3 @@ class MspApp : NumassControlApplication<MspDevice>() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Application.launch(MspApp::class.java)
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,13 +78,13 @@ abstract class DeviceDisplayFX<D : Device> : Component(), Connection {
|
||||
protected abstract fun buildView(device: D): UIComponent?;
|
||||
|
||||
fun valueStateProperty(stateName: String): ObjectProperty<Value> {
|
||||
val state: ValueState = device.states.filterIsInstance<ValueState>().find { it.name == stateName }
|
||||
val state: ValueState = device.states.filterIsInstance(ValueState::class.java).find { it.name == stateName }
|
||||
?: throw NameNotFoundException("State with name $stateName not found")
|
||||
return state.asProperty()
|
||||
}
|
||||
|
||||
fun booleanStateProperty(stateName: String): BooleanProperty {
|
||||
val state: ValueState = device.states.filterIsInstance<ValueState>().find { it.name == stateName }
|
||||
val state: ValueState = device.states.filterIsInstance(ValueState::class.java).find { it.name == stateName }
|
||||
?: throw NameNotFoundException("State with name $stateName not found")
|
||||
return state.asBooleanProperty()
|
||||
}
|
||||
|
@ -112,17 +112,15 @@ fun EventTarget.deviceStateIndicator(connection: DeviceDisplayFX<*>, state: Stri
|
||||
fun Node.deviceStateToggle(connection: DeviceDisplayFX<*>, state: String, title: String = state) {
|
||||
if (connection.device.stateNames.contains(state)) {
|
||||
togglebutton(title) {
|
||||
isSelected = false
|
||||
selectedProperty().addListener { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
connection.device.states[state] = newValue
|
||||
}
|
||||
}
|
||||
connection.valueStateProperty(state).apply {
|
||||
isSelected = value?.boolean ?: false
|
||||
onChange {
|
||||
runLater {
|
||||
isSelected = it?.boolean ?: false
|
||||
}
|
||||
connection.valueStateProperty(state).onChange {
|
||||
runLater {
|
||||
isSelected = it?.boolean ?: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
version = "0.6.0"
|
||||
@ -15,7 +15,7 @@ dependencies {
|
||||
}
|
||||
|
||||
application{
|
||||
mainClassName = "inr.numass.control.readvac.ReadVacKt"
|
||||
mainClassName("inr.numass.control.readvac.ReadVac")
|
||||
}
|
||||
|
||||
task testDevice(dependsOn: classes, type: JavaExec) {
|
||||
|
@ -8,7 +8,6 @@ package inr.numass.control.readvac
|
||||
import hep.dataforge.meta.Meta
|
||||
import hep.dataforge.meta.MetaUtils
|
||||
import inr.numass.control.NumassControlApplication
|
||||
import javafx.application.Application
|
||||
import javafx.stage.Stage
|
||||
|
||||
/**
|
||||
@ -31,9 +30,5 @@ class ReadVac : NumassControlApplication<VacCollectorDevice>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Application.launch(ReadVac::class.java)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -47,10 +47,6 @@ class VacCollectorDevice(context: Context, meta: Meta, val sensors: Collection<S
|
||||
|
||||
private val helper = StorageHelper(this, this::buildLoader)
|
||||
|
||||
init {
|
||||
states["storing"] = true
|
||||
}
|
||||
|
||||
private val collector = object : DeviceListener {
|
||||
val averagingDuration: Duration = Duration.parse(meta.getString("averagingDuration", "PT30S"))
|
||||
|
||||
|
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
@ -8,7 +8,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.graphics", "javafx.controls", "javafx.web")
|
||||
version = "16"
|
||||
version = "11"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
Loading…
Reference in New Issue
Block a user