Skip to content

Commit

Permalink
Version 1.2.2 FINAL
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-lindau committed Jul 19, 2017
1 parent 09ca0d5 commit b640fc5
Show file tree
Hide file tree
Showing 13 changed files with 298 additions and 393 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Aerowinx PSX Smart Interface
[![Packagist](https://img.shields.io/badge/version-1.2-brightgreen.svg)](SmartInterface)
[![Packagist](https://img.shields.io/badge/version-1.2.2-brightgreen.svg)](SmartInterface)
[![Packagist](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com/eric-lindau/PSX-Smart-Interface)
[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](LICENSE.md)

Expand Down Expand Up @@ -40,3 +40,4 @@ This add-on relies on the IP address and TCP port specified in the automatically
* Added feature that saves user definitions for persistent use as well as allows for user configuration of advanced settings.
* Added functionality with many more analog, button, and rotary components.
* Improved network efficiency and fixed a critical network bug that was causing PSX server to freeze/crash.
* Fixed a variety of bugs and issues
Binary file added SmartInterface-1.2.2.zip
Binary file not shown.
Binary file removed SmartInterface-1.2.zip
Binary file not shown.
616 changes: 258 additions & 358 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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified SmartInterface/out/production/SmartInterface/SmartInterface.class
Binary file not shown.
7 changes: 5 additions & 2 deletions SmartInterface/saved.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
19. Controller (Gamepad F310) - Button 0`LCP Outbd - Capt`0
20. Controller (Gamepad F310) - Button 1`LCP Outbd - F/O`0
19. Controller (Gamepad F310) - Button 0`AUTO`0
20. Controller (Gamepad F310) - Button 1`L/R`0
21. Controller (Gamepad F310) - Button 2`TEST`0
25. Controller (Gamepad F310) - Button 6`WX+T - F/O`0
26. Controller (Gamepad F310) - Button 7`WX - F/O`0
65 changes: 33 additions & 32 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
* @version 1.2.2
*/
class SmartInterface {

Expand Down Expand Up @@ -108,8 +108,8 @@ class SmartInterface {
// Buffers to be combined as String sent for radar panel button values (Qs104)
private static char[] rdrStrCpt, rdrStrFo;
private static char[] rdrStrMisc = {'A', 'R', 'E'};
// Keeps track of ticks since last misc radar panel button presses for toggling
private static long[] ticks = {0, 0, 0};
// Keeps track of radar panel unpressing for toggling functionality
private static boolean[] unPressed = {false, false, false};

public static void main(String[] args) {
initConfig();
Expand Down Expand Up @@ -255,36 +255,37 @@ else if (rdrStrCpt == null)
rdrStrCpt[4] = 'G';

// Middle (misc) row
// Toggle functionality, with 5 ticks (100 ms) between each allowed toggle
if (Utils.isPushed(auto))
if (ticks[0] <= 0) {
ticks[0] = 5;
if (rdrStrMisc[0] == 'a')
rdrStrMisc[0] = 'A';
else
rdrStrMisc[0] = 'a';
}
ticks[0]--;
// Toggled radar panel buttons
if (!unPressed[0] && !Utils.isPushed(auto))
unPressed[0] = true;
if (!unPressed[1] && !Utils.isPushed(lr))
unPressed[1] = true;
if (!unPressed[2] && !Utils.isPushed(test))
unPressed[2] = true;

if (unPressed[0] && Utils.isPushed(auto)) {
if (rdrStrMisc[0] == 'a')
rdrStrMisc[0] = 'A';
else
rdrStrMisc[0] = 'a';
unPressed[0] = false;
}

if (Utils.isPushed(lr))
if (ticks[1] <= 0) {
ticks[1] = 5;
if (rdrStrMisc[1] == 'r')
rdrStrMisc[1] = 'R';
else
rdrStrMisc[1] = 'r';
}
ticks[1]--;
if (unPressed[1] && Utils.isPushed(lr)) {
if (rdrStrMisc[1] == 'r')
rdrStrMisc[1] = 'R';
else
rdrStrMisc[1] = 'r';
unPressed[1] = false;
}

if (Utils.isPushed(test))
if (ticks[2] <= 0) {
ticks[2] = 5;
if (rdrStrMisc[2] == 'e')
rdrStrMisc[2] = 'E';
else
rdrStrMisc[2] = 'e';
}
ticks[2]--;
if (unPressed[2] && Utils.isPushed(test)) {
if (rdrStrMisc[2] == 'e')
rdrStrMisc[2] = 'E';
else
rdrStrMisc[2] = 'e';
unPressed[2] = false;
}

// First officer (right) row
if (Utils.isPushed(tfrFo))
Expand Down Expand Up @@ -797,7 +798,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.1");
JFrame frame = new JFrame("PSX SmartInterface v1.2.2");
frame.setPreferredSize(new Dimension(800, 600));
frame.setResizable(false);
frame.getContentPane().add(scrollPane);
Expand Down
Binary file added Versions/SmartInterface-1.2.2.zip
Binary file not shown.
Binary file removed Versions/SmartInterface-1.2.zip
Binary file not shown.

0 comments on commit b640fc5

Please sign in to comment.