Commit 34485de0 authored by Vincent van Beveren's avatar Vincent van Beveren

fixed some issues in the build and XML

parent 1449da57
......@@ -391,6 +391,7 @@ public class DDMILoader {
_xol.setMapping("group", DDMIGroup.class);
_xol.setMapping("ddmi", DDMI.class);
_xol.setMapping("int", new DDMIValueFactory(DDMIValue.DDMIType.INT_TYPE));
_xol.setMapping("uint", new DDMIValueFactory(DDMIValue.DDMIType.UINT_TYPE));
_xol.setMapping("bitmap", new DDMIValueFactory(DDMIValue.DDMIType.BITMAP_TYPE));
_xol.setMapping("text", new DDMIValueFactory(DDMIValue.DDMIType.TEXT_TYPE));
_xol.setMapping("float", new DDMIValueFactory(DDMIValue.DDMIType.DECIMAL_TYPE_FLOAT));
......@@ -410,7 +411,7 @@ public class DDMILoader {
_xol.setMapping("map", new DDMIMapMetaFactory(DDMIMeta.LOOKUP));
_xol.setMapping("bool", new DDMIMapMetaFactory(DDMIMeta.BITFIELD));
_xol.setMapping("convert", new DDMIMapMetaFactory(DDMIMeta.CONV));
_xol.setMapping("scale", new DDMIMapMetaFactory(DDMIMeta.CONV));
_fxml = new FXML(base, xsd);
......
......@@ -33,7 +33,7 @@
<xs:union memberTypes="xs:unsignedByte">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="x[0-9A-Fa-f]{1,3}" />
<xs:pattern value="x[0-9A-Fa-f]{1,2}" />
</xs:restriction>
</xs:simpleType>
</xs:union>
......@@ -60,8 +60,8 @@
<xs:extension base="element">
<xs:attribute type="xs:boolean" name="writable" use="optional" />
<xs:attribute type="xs:boolean" name="monitor" use="optional" />
<xs:attribute type="xs:unsignedByte" name="offset" use="optional" />
<xs:attribute type="xs:unsignedByte" name="length" use="optional" />
<xs:attribute type="unsignedByte" name="offset" use="required" />
<xs:attribute type="unsignedByte" name="length" use="required" />
<xs:attribute type="xs:string" name="level" use="optional" />
</xs:extension>
</xs:complexContent>
......@@ -148,6 +148,7 @@
<xs:extension base="element">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element ref="int" />
<xs:element ref="uint" />
<xs:element ref="bitmap" />
<xs:element ref="text" />
<xs:element ref="group" />
......
......@@ -56,8 +56,7 @@
<fileset dir="overlays"/>
</copy>
<echo file="${dist}/safaripark.bat">@echo off
java -cp "rebus.jar;jna-4.3.0.jar;nikhef-tools.jar;luaj-jse-3.0.1.jar;jsfp.jar;safaripark.jar;miglayout-4.0-swing.jar" nl.nikhef.safaripark.SaFariPark
pause
start /b javaw -cp "rebus.jar;jna-4.3.0.jar;nikhef-tools.jar;luaj-jse-3.0.1.jar;jsfp.jar;safaripark.jar;miglayout-4.0-swing.jar" -splash:splash.png nl.nikhef.safaripark.SaFariPark
</echo>
<zip destfile="safaripark-${git.branch}-${git.tag}-${git.revision}.zip" basedir="${dist}">
......
......@@ -27,13 +27,13 @@
<group label="OE Solutions custom">
<group source-id="diag" showIf="isset(id.montype, 6)">
<bitmap label="Password (4F 45 53 50)" writable="true"
offset="x7B" length="4" level="basic">
offset="x7b" length="4" level="basic">
</bitmap>
</group>
<group source-id="diag_p4" showIf="isset(id.montype, 6)">
<int label="Tune value" writable="true"
<uint label="Tune value" writable="true"
offset="x8B" length="2" level="basic">
</int>
</uint>
</group>
</group>
......
......@@ -33,20 +33,20 @@
<group label="Laser capabilities">
<int label="First Frequency (THz)" writable="false" name="LFL1" offset="132" length="2" level="basic" />
<ufix label="First Frequency (GHz)" writable="false" name="LFL2" offset="134" length="2" level="basic">
<convert scale="0.1"/>
<scale scale="0.1"/>
</ufix>
<int label="Last Frequency (THz)" writable="false" name="LFH1" offset="136" length="2" level="basic" />
<ufix label="Last Frequency (GHz)" writable="false" name="LFH2" offset="138" length="2" level="basic">
<convert scale="0.1"/>
<scale scale="0.1"/>
</ufix>
<ufix label="Minimum grid spacing (GHz)" writable="false" name="LGrid" offset="140" length="2" level="basic" >
<convert scale="0.1"/>
<scale scale="0.1"/>
</ufix>
</group>
<group label="Frequency and wavelength control">
<int label="Channel number set" writable="true" name="chno_set" offset="144" length="2" level="basic" />
<ufix label="Wavelength set (nm)" writable="true" name="wl_set" offset="146" length="2" level="basic" >
<convert scale="0.05"/>
<scale scale="0.05"/>
</ufix>
<bitmap label="Other options" writable="true" name="tx_dither" offset="151" length="1" level="basic">
<bool bit="0">Disable dithering</bool>
......
......@@ -323,13 +323,6 @@ public class SaFariPark extends JFrame implements BaySelectionListener, WindowLi
public static void main(String[] args)
{
System.out.printf("Starting SaFariPark on %s Java %s (%s bit) and %s (OS=%s, %s)\n",
System.getProperty("java.vendor"),
System.getProperty("java.version"),
System.getProperty("sun.arch.data.model") ,
System.getProperty("os.name"),
System.getProperty("os.version"),
System.getProperty("os.arch"));
Locale.setDefault(Locale.US);
......@@ -401,7 +394,23 @@ public class SaFariPark extends JFrame implements BaySelectionListener, WindowLi
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Oh no! An error occured.");
pw.println("If the problem persists, please copy the information below");
pw.println("and create a new issue at:");
pw.println(" http://www.ohwr.org/projects/sfp-plus-i2c/issues");
pw.println();
pw.printf("%s Java %s (%s bit) and %s (OS=%s, %s)\n",
System.getProperty("java.vendor"),
System.getProperty("java.version"),
System.getProperty("sun.arch.data.model") ,
System.getProperty("os.name"),
System.getProperty("os.version"),
System.getProperty("os.arch"));
pw.println("Error trace:");
e.printStackTrace(pw);
JTextArea jte = new JTextArea(sw.toString());
JScrollPane jsp = new JScrollPane(jte);
......@@ -412,10 +421,12 @@ public class SaFariPark extends JFrame implements BaySelectionListener, WindowLi
Dimension dm = new Dimension(width / 2, height / 2);
jte.setEditable(false);
jsp.setPreferredSize(dm);
JOptionPane.showMessageDialog(parent, jsp, "Fatal error", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment