New ScreenPanel

This commit is contained in:
2018-01-19 10:56:53 +01:00
commit ae4d621609
580 changed files with 46598 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
import ch.psi.pshell.scan.LineScan;
import ch.psi.pshell.scan.AreaScan;
def sleep(millis){
Thread.sleep(millis);
}
def toArray(obj){
/* if (!obj.getClass().isArray()){
arr = java.lang.reflect.Array.newInstance(obj.getClass(), 1);
arr[0]= obj;
obj=arr
}*/
return obj
}
def scan(writables, readables, start, end, steps, latency_ms=0, plot=null){
writables=toList(writables)
readables=toList(readables)
start=toList(start)
end=toList(end)
scan = LineScan(writables,readables, start, end , steps,latency_ms, controller)
scan.setPlotName(plot)
scan.start()
return scan.getResult()
}
def tscan(readables, points, interval_ms, plot=null){
writables=[]
//readables=toList(readables)
readables=[readables,]
start=[0]
end=[points]
steps=points
scan = LineScan(writables,readables, start, end , steps,interval_ms, controller)
scan.setPlotName(plot)
scan.start()
return scan.getResult()
}
def ascan(writables, readables, start, end, steps, latency_ms0, plot=null){
writables=toList(writables)
readables=toList(readables)
start=toList(start)
end=toList(end)
scan = AreaScan(writables,readables, start, end , steps,latency_ms, controller)
scan.setPlotName(plot)
scan.start()
return scan.getResult()
}