diff --git a/Falcon BMS Alternative Launcher/Input/CommonConstants.cs b/Falcon BMS Alternative Launcher/Input/CommonConstants.cs
index 74a7c98..2bb6083 100644
--- a/Falcon BMS Alternative Launcher/Input/CommonConstants.cs
+++ b/Falcon BMS Alternative Launcher/Input/CommonConstants.cs
@@ -29,6 +29,7 @@ public static class CommonConstants
public static readonly int AXISMIN = 0;
public static readonly int AXISMAX = 65536;
+ public static readonly int AXIS_NEUTRAL_TOLERANCE = AXISMAX / 128;
public static readonly int FLUSHTIME1 = 900;
public static readonly int FLUSHTIME2 = 1500;
diff --git a/Falcon BMS Alternative Launcher/Windows/AxisAssignWindow.xaml.cs b/Falcon BMS Alternative Launcher/Windows/AxisAssignWindow.xaml.cs
index e7fc83c..badf997 100644
--- a/Falcon BMS Alternative Launcher/Windows/AxisAssignWindow.xaml.cs
+++ b/Falcon BMS Alternative Launcher/Windows/AxisAssignWindow.xaml.cs
@@ -326,21 +326,41 @@ private void ShowAxisStatus()
+ ((AxisNumName)phyAxNumTmp).ToString().Replace('_', ' ') + " : "
+ MainWindow.deviceControl.GetJoystickMappings()[devNumTmp].GetSanitizedProductName();
- if (whoCalledWindow != AxisName.Throttle.ToString() & whoCalledWindow != AxisName.Throttle_Right.ToString())
- return;
- AxisValueProgress.Foreground = CommonConstants.LIGHTBLUE;
- check_ABIDLE.Visibility = Visibility.Hidden;
- if ( (Invert.IsChecked == false && CommonConstants.AXISMAX + AxisValueProgress.Value < IDLE) || (Invert.IsChecked == true && CommonConstants.AXISMIN + AxisValueProgress.Value < IDLE))
+
+ if (whoCalledWindow == AxisName.Cursor_X.ToString() | whoCalledWindow == AxisName.Cursor_Y.ToString())
{
- AxisValueProgress.Foreground = CommonConstants.LIGHTRED;
- check_ABIDLE.Visibility = Visibility.Visible;
- check_ABIDLE.Content = "IDLE CUTOFF";
+ if (Math.Abs(AxisValueProgress.Value) < CommonConstants.AXISMAX * 0.5 - CommonConstants.AXIS_NEUTRAL_TOLERANCE |
+ Math.Abs(AxisValueProgress.Value) > CommonConstants.AXISMAX * 0.5 + CommonConstants.AXIS_NEUTRAL_TOLERANCE)
+ {
+ AxisValueProgress.Foreground = CommonConstants.LIGHTRED;
+ check_ABIDLE.Visibility = Visibility.Visible;
+ check_ABIDLE.Content = "NOT NEUTRAL";
+ }
+ else
+ {
+ AxisValueProgress.Foreground = CommonConstants.LIGHTBLUE;
+ check_ABIDLE.Visibility = Visibility.Hidden;
+ check_ABIDLE.Content = "NOT NEUTRAL";
+ }
}
- if ( (Invert.IsChecked == false && CommonConstants.AXISMAX + AxisValueProgress.Value > AB) || (Invert.IsChecked == true && CommonConstants.AXISMIN + AxisValueProgress.Value > AB) )
+
+ if (whoCalledWindow == AxisName.Throttle.ToString() | whoCalledWindow == AxisName.Throttle_Right.ToString())
{
- AxisValueProgress.Foreground = CommonConstants.LIGHTGREEN;
- check_ABIDLE.Visibility = Visibility.Visible;
- check_ABIDLE.Content = "AB";
+ AxisValueProgress.Foreground = CommonConstants.LIGHTBLUE;
+ check_ABIDLE.Visibility = Visibility.Hidden;
+
+ if ((Invert.IsChecked == false && CommonConstants.AXISMAX + AxisValueProgress.Value < IDLE) || (Invert.IsChecked == true && CommonConstants.AXISMIN + AxisValueProgress.Value < IDLE))
+ {
+ AxisValueProgress.Foreground = CommonConstants.LIGHTRED;
+ check_ABIDLE.Visibility = Visibility.Visible;
+ check_ABIDLE.Content = "IDLE CUTOFF";
+ }
+ if ((Invert.IsChecked == false && CommonConstants.AXISMAX + AxisValueProgress.Value > AB) || (Invert.IsChecked == true && CommonConstants.AXISMIN + AxisValueProgress.Value > AB))
+ {
+ AxisValueProgress.Foreground = CommonConstants.LIGHTGREEN;
+ check_ABIDLE.Visibility = Visibility.Visible;
+ check_ABIDLE.Content = "AB";
+ }
}
}
diff --git a/Falcon BMS Alternative Launcher/Windows/MainWindow.xaml b/Falcon BMS Alternative Launcher/Windows/MainWindow.xaml
index e8b067a..28e110d 100644
--- a/Falcon BMS Alternative Launcher/Windows/MainWindow.xaml
+++ b/Falcon BMS Alternative Launcher/Windows/MainWindow.xaml
@@ -9,514 +9,516 @@
Title="FalconBMS Alternative Launcher" Height="768" Width="1024" MinHeight="768" MinWidth="1024" BorderThickness="0"
Closed="Window_Closed" MouseDown="MetroWindow_MouseDown"
FontSize="12" WindowStartupLocation="CenterScreen" ShowTitleBar="False" WindowStyle="None" Background="#a4a9ac" OverrideDefaultWindowCommandsBrush="#a4a9ac">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Weapon Delivery Planner
-
-
-
-
-
+
+
+
+
+
@@ -531,30 +533,30 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Falcon BMS Alternative Launcher/Windows/MainWindowAxisAssign.cs b/Falcon BMS Alternative Launcher/Windows/MainWindowAxisAssign.cs
index 051c154..8c196d8 100644
--- a/Falcon BMS Alternative Launcher/Windows/MainWindowAxisAssign.cs
+++ b/Falcon BMS Alternative Launcher/Windows/MainWindowAxisAssign.cs
@@ -201,30 +201,51 @@ internal void MainWindowAxisAssign_HandleTimerTick()
tblabel.Content = ((string)tblabel.Content).Replace("Slider 0", "S1");
tblabel.Content = ((string)tblabel.Content).Replace("Slider 1", "S2");
- if (nme != AxisName.Throttle & nme != AxisName.Throttle_Right)
- continue;
-
- tblabelab = FindName("AB_" + nme) as Label;
- tblabelab.Visibility = Visibility.Hidden;
+ if (nme == AxisName.Cursor_X | nme == AxisName.Cursor_Y)
+ {
+ tblabelab = FindName("Non_Neutral_Warning_" + nme) as Label;
- tbprogressbar.Foreground = CommonConstants.LIGHTBLUE;
+ tbprogressbar.Foreground = CommonConstants.LIGHTBLUE;
+ tblabelab.Visibility = Visibility.Hidden;
- InGameAxAssgn throttleAxis = (InGameAxAssgn)MainWindow.inGameAxis[AxisName.Throttle.ToString()];
- if (throttleAxis.GetDeviceNumber() >= 0)
- {
- if ( !axis.GetInvert() && CommonConstants.AXISMAX + tbprogressbar.Value < GetIDLE() ||
- axis.GetInvert() && CommonConstants.AXISMIN + tbprogressbar.Value < GetIDLE() )
+ if (Math.Abs(tbprogressbar.Value) < CommonConstants.AXISMAX * 0.5 - CommonConstants.AXIS_NEUTRAL_TOLERANCE |
+ Math.Abs(tbprogressbar.Value) > CommonConstants.AXISMAX * 0.5 + CommonConstants.AXIS_NEUTRAL_TOLERANCE)
{
tbprogressbar.Foreground = CommonConstants.LIGHTRED;
tblabelab.Visibility = Visibility.Visible;
- tblabelab.Content = "IDLE CUTOFF";
+ tblabelab.Content = "NOT NEUTRAL";
}
- if ( !axis.GetInvert() && CommonConstants.AXISMAX + tbprogressbar.Value > GetAB() ||
- axis.GetInvert() && CommonConstants.AXISMIN + tbprogressbar.Value > GetAB() )
+ else
{
- tbprogressbar.Foreground = CommonConstants.LIGHTGREEN;
- tblabelab.Visibility = Visibility.Visible;
- tblabelab.Content = "AB";
+ tbprogressbar.Foreground = CommonConstants.LIGHTBLUE;
+ tblabelab.Visibility = Visibility.Hidden;
+ }
+ }
+
+ if (nme == AxisName.Throttle | nme == AxisName.Throttle_Right)
+ {
+ tblabelab = FindName("AB_" + nme) as Label;
+ tblabelab.Visibility = Visibility.Hidden;
+
+ tbprogressbar.Foreground = CommonConstants.LIGHTBLUE;
+
+ InGameAxAssgn throttleAxis = (InGameAxAssgn)MainWindow.inGameAxis[AxisName.Throttle.ToString()];
+ if (throttleAxis.GetDeviceNumber() >= 0)
+ {
+ if (!axis.GetInvert() && CommonConstants.AXISMAX + tbprogressbar.Value < GetIDLE() ||
+ axis.GetInvert() && CommonConstants.AXISMIN + tbprogressbar.Value < GetIDLE())
+ {
+ tbprogressbar.Foreground = CommonConstants.LIGHTRED;
+ tblabelab.Visibility = Visibility.Visible;
+ tblabelab.Content = "IDLE CUTOFF";
+ }
+ if (!axis.GetInvert() && CommonConstants.AXISMAX + tbprogressbar.Value > GetAB() ||
+ axis.GetInvert() && CommonConstants.AXISMIN + tbprogressbar.Value > GetAB())
+ {
+ tbprogressbar.Foreground = CommonConstants.LIGHTGREEN;
+ tblabelab.Visibility = Visibility.Visible;
+ tblabelab.Content = "AB";
+ }
}
}
}