Closedown

This commit is contained in:
voulot_d
2017-01-27 16:14:21 +01:00
parent fe74aea0f3
commit ccf6c60377
3 changed files with 47 additions and 13 deletions
+20 -5
View File
@@ -239,11 +239,16 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerPhaseRef" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerPhaseRef" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jButton1" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -256,7 +261,9 @@
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerPhaseRef" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="116" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="79" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -278,6 +285,14 @@
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerPhaseRefStateChanged"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jButton1">
<Properties>
<Property name="text" type="java.lang.String" value="Set Ref Phase"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
+26 -7
View File
@@ -111,6 +111,7 @@ public class ShottkyScan extends Panel {
jPanel2 = new javax.swing.JPanel();
jLabel7 = new javax.swing.JLabel();
spinnerPhaseRef = new javax.swing.JSpinner();
jButton1 = new javax.swing.JButton();
buttonStart.setText("Start");
buttonStart.addActionListener(new java.awt.event.ActionListener() {
@@ -227,15 +228,25 @@ public class ShottkyScan extends Panel {
}
});
jButton1.setText("Set Ref Phase");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerPhaseRef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerPhaseRef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
@@ -245,7 +256,9 @@ public class ShottkyScan extends Panel {
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(spinnerPhaseRef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(116, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addContainerGap(79, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -301,7 +314,6 @@ public class ShottkyScan extends Panel {
parameters.add(spinnerLatency.getValue());
try {
//How to get a callback on the end of execution
runAsync("RFscan/ShottkyScan", parameters).handle((ret, ex) -> {
if (ex != null){
getLogger().info("Exception executing scan: " + ex);
@@ -310,8 +322,6 @@ public class ShottkyScan extends Panel {
}
return ret;
});
//runAsync("RFscan/ShottkyScan", parameters);
} catch (Exception ex) {
showException(ex);
@@ -336,9 +346,18 @@ public class ShottkyScan extends Panel {
}
}//GEN-LAST:event_spinnerPhaseRefStateChanged
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
try {
//caput("SINEG01-RSYS:CALC-VSUM-PHASE-OFFSET", spinnerPhaseRef.value)
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_jButton1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.JButton buttonStart;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
+1 -1
View File
@@ -42,7 +42,7 @@ y = r.getReadable(0)
x = r.getPositions(0)
y = [v.mean for v in y]
index_max = y.index(max(y))
phase_ref = x[index_max]
phase_ref = x[index_max] - 90
phase_offset = - phase_ref
caput("SINEG01-RSYS:CALC-VSUM-PHASE-OFFSET", phase_offset)