Compare commits
3 Commits
fix/PKT8-c
...
master
Author | SHA1 | Date | |
---|---|---|---|
2baf583473 | |||
9a1e9dc996 | |||
b2bc67ecc3 |
@ -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 8 with JavaFX for desktop controls (https://www.azul.com/downloads/?version=java-8-lts&package=jdk-fx)
|
||||
Project requires JDK 16 in the system. GUI modules must be compiled on the target OS (linux on linux systems)
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls", "javafx.web")
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
description = "A tornadofx based kotlin library"
|
||||
|
@ -7,7 +7,7 @@ apply plugin: 'kotlin'
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
if (!hasProperty('mainClass')) {
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls")
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
description = "dataforge-plots"
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.controls")
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
description = "jFreeChart plugin"
|
||||
|
@ -6,7 +6,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
apply plugin: 'application'
|
||||
@ -22,7 +22,7 @@ dependencies {
|
||||
}
|
||||
|
||||
application{
|
||||
mainClassName("inr.numass.control.cryotemp.PKT8App")
|
||||
mainClassName = "inr.numass.control.cryotemp.PKT8AppKt"
|
||||
}
|
||||
|
||||
task testDevice(dependsOn: classes, type: JavaExec) {
|
||||
|
@ -18,6 +18,7 @@ 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
|
||||
|
||||
/**
|
||||
@ -38,3 +39,9 @@ class PKT8App : NumassControlApplication<PKT8Device>() {
|
||||
.orElseThrow{RuntimeException("Temperature measurement configuration not found")}
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Application.launch(PKT8App::class.java)
|
||||
}
|
||||
|
||||
|
||||
|
@ -251,10 +251,6 @@ 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 = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
version = "0.3.0"
|
||||
|
@ -5,15 +5,14 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
version = "0.4.0"
|
||||
|
||||
if (!hasProperty('mainClass')) {
|
||||
ext.mainClass = 'inr.numass.control.msp.MspApp'
|
||||
application{
|
||||
mainClassName = "inr.numass.control.msp.MspAppKt"
|
||||
}
|
||||
mainClassName = mainClass
|
||||
|
||||
|
||||
dependencies {
|
||||
|
@ -18,6 +18,7 @@ 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
|
||||
|
||||
/**
|
||||
@ -39,3 +40,9 @@ 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::class.java).find { it.name == stateName }
|
||||
val state: ValueState = device.states.filterIsInstance<ValueState>().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::class.java).find { it.name == stateName }
|
||||
val state: ValueState = device.states.filterIsInstance<ValueState>().find { it.name == stateName }
|
||||
?: throw NameNotFoundException("State with name $stateName not found")
|
||||
return state.asBooleanProperty()
|
||||
}
|
||||
|
@ -112,15 +112,17 @@ 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).onChange {
|
||||
runLater {
|
||||
isSelected = it?.boolean ?: false
|
||||
connection.valueStateProperty(state).apply {
|
||||
isSelected = value?.boolean ?: false
|
||||
onChange {
|
||||
runLater {
|
||||
isSelected = it?.boolean ?: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ plugins{
|
||||
|
||||
javafx {
|
||||
modules = ["javafx.controls", "javafx.web"]
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
version = "0.6.0"
|
||||
@ -15,7 +15,7 @@ dependencies {
|
||||
}
|
||||
|
||||
application{
|
||||
mainClassName("inr.numass.control.readvac.ReadVac")
|
||||
mainClassName = "inr.numass.control.readvac.ReadVacKt"
|
||||
}
|
||||
|
||||
task testDevice(dependsOn: classes, type: JavaExec) {
|
||||
|
@ -8,6 +8,7 @@ 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
|
||||
|
||||
/**
|
||||
@ -30,5 +31,9 @@ class ReadVac : NumassControlApplication<VacCollectorDevice>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Application.launch(ReadVac::class.java)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -47,6 +47,10 @@ 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 = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
@ -8,7 +8,7 @@ plugins {
|
||||
|
||||
javafx {
|
||||
modules = listOf("javafx.graphics", "javafx.controls", "javafx.web")
|
||||
version = "11"
|
||||
version = "16"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
Loading…
Reference in New Issue
Block a user