Skip to content

Commit

Permalink
Version 1.2.3 FINAL (LCP WXR BRT dials added)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-lindau committed Jul 19, 2017
1 parent b640fc5 commit c9b1457
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 170 deletions.
Binary file removed SmartInterface-1.2.2.zip
Binary file not shown.
Binary file added SmartInterface-1.2.3.zip
Binary file not shown.
403 changes: 235 additions & 168 deletions SmartInterface/.idea/workspace.xml

Large diffs are not rendered by default.

Binary file modified SmartInterface/out/artifacts/SmartInterface_jar/SmartInterface.jar
Binary file not shown.
1 change: 1 addition & 0 deletions SmartInterface/out/artifacts/SmartInterface_jar/saved.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
19. Controller (Gamepad F310) - Button 0`LCP Outbd - Capt`0
20. Controller (Gamepad F310) - Button 1`LCP Outbd - F/O`0
18. Controller (Gamepad F310) - Z Axis`LCP WXR - F/O`0
Binary file not shown.
Binary file modified SmartInterface/out/production/SmartInterface/SmartInterface$2.class
Binary file not shown.
Binary file not shown.
Binary file modified SmartInterface/out/production/SmartInterface/SmartInterface.class
Binary file not shown.
35 changes: 33 additions & 2 deletions SmartInterface/src/SmartInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* https://github.com/eric-lindau/PSX-Smart-Interface
*
* @author Eric Lindau
* @version 1.2.2
* @version 1.2.3
*/
class SmartInterface {

Expand Down Expand Up @@ -79,6 +79,8 @@ class SmartInterface {
private static Component lcpNdCpt;
private static Component lcpOutbdFo;
private static Component lcpNdFo;
private static Component lcpWxrCpt;
private static Component lcpWxrFo;
private static Component eicasBrtUpr;
private static Component eicasBrtLwrInner;
private static Component eicasBrtLwrOuter;
Expand All @@ -101,6 +103,8 @@ class SmartInterface {
private static Value lcpNdCptVal = new Value();
private static Value lcpOutbdFoVal = new Value();
private static Value lcpNdFoVal = new Value();
private static Value lcpWxrCptVal = new Value();
private static Value lcpWxrFoVal = new Value();
private static Value eicasBrtUprVal = new Value();
private static Value eicasBrtLwrInnerVal = new Value();
private static Value eicasBrtLwrOuterVal = new Value();
Expand Down Expand Up @@ -366,6 +370,20 @@ else if (rdrStrFo == null)
client.send(lcpNdFoVal.getStr());
}

if (lcpWxrCpt != null) {
int lcpWxrCptInt = Utils.getAnalogValue(lcpWxrCpt, 4713, false);
lcpWxrCptVal.setStr("Qh88=" + Integer.toString(lcpWxrCptInt));
if (lcpWxrCptVal.hasChanged())
client.send(lcpWxrCptVal.getStr());
}

if (lcpWxrFo != null) {
int lcpWxrFoInt = Utils.getAnalogValue(lcpWxrFo, 4713, false);
lcpWxrFoVal.setStr("Qh99=" + Integer.toString(lcpWxrFoInt));
if (lcpWxrFoVal.hasChanged())
client.send(lcpWxrFoVal.getStr());
}

if (eicasBrtUpr != null) {
int eicasBrtUprInt = Utils.getAnalogValue(eicasBrtUpr, 4713, false);
eicasBrtUprVal.setStr("Qh139=" + Integer.toString(eicasBrtUprInt));
Expand Down Expand Up @@ -674,6 +692,18 @@ public void itemStateChanged(ItemEvent itemEvent) {
else
lcpNdFo = modifySavedComponents(index, true, item);
break;
case "LCP WXR - Capt":
if (itemEvent.getStateChange() == ItemEvent.SELECTED)
lcpWxrCpt = modifySavedComponents(index, false, item);
else
lcpWxrCpt = modifySavedComponents(index, true, item);
break;
case "LCP WXR - F/O":
if (itemEvent.getStateChange() == ItemEvent.SELECTED)
lcpWxrFo = modifySavedComponents(index, false, item);
else
lcpWxrFo = modifySavedComponents(index, false, item);
break;
case "EICAS BRT - Upr":
if (itemEvent.getStateChange() == ItemEvent.SELECTED)
eicasBrtUpr = modifySavedComponents(index, false, item);
Expand Down Expand Up @@ -723,6 +753,7 @@ public void itemStateChanged(ItemEvent itemEvent) {
"Landing Altitude",
"LCP Outbd - Capt", "LCP ND - Capt",
"LCP Outbd - F/O", "LCP ND - F/O",
"LCP WXR - Capt", "LCP WXR - F/O",
"EICAS BRT - Upr",
"EICAS BRT - Lwr Inner",
"EICAS BRT - Lwr Outer"
Expand Down Expand Up @@ -798,7 +829,7 @@ public void itemStateChanged(ItemEvent itemEvent) {
// 569 used to offset width of bar itself
scrollPane.setPreferredSize(new Dimension(800, 569));

JFrame frame = new JFrame("PSX SmartInterface v1.2.2");
JFrame frame = new JFrame("PSX SmartInterface v1.2.3");
frame.setPreferredSize(new Dimension(800, 600));
frame.setResizable(false);
frame.getContentPane().add(scrollPane);
Expand Down
Binary file removed Versions/SmartInterface-1.2.2.zip
Binary file not shown.
Binary file added Versions/SmartInterface-1.2.3.zip
Binary file not shown.

0 comments on commit c9b1457

Please sign in to comment.