Skip to content

Commit

Permalink
Remove deprecated vjoy code and files
Browse files Browse the repository at this point in the history
  • Loading branch information
lshachar committed Nov 10, 2020
1 parent 978e6f3 commit 773ebe6
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 374 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
#x64/
#x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# WiiBalanceWalker v0.5 - by Shachar Liberman
## WiiBalanceWalker v0.4 and before - Released by Richard Perry from GreyCube.com - Under the Microsoft Public License.

[Uses lshachar's WiimoteLib DLL ](https://github.com/lshachar/WiimoteLib)<br/>
[Uses the 32Feet.NET bluetooth DLL](http://32feet.codeplex.com)<br/>
[Uses vJoy device driver (by Shaul Eizikovich)]( http://vjoystick.sourceforge.net/)<br/>
(Previous to v0.5 [VJoy by headsoft](http://headsoft.com.au/index.php?category=vjoy) was used)<br/>
***
released for windows 10 x64 systems, x86 should be supported too.

Uses lshachar's WiimoteLib DLL: https://github.com/lshachar/WiimoteLib
Uses the 32Feet.NET bluetooth DLL: http://32feet.codeplex.com/
Uses vJoy device driver (by Shaul Eizikovich): http://vjoystick.sourceforge.net/
(Previous to WiiBalanceWalker v0.5
VJoy by headsoft was used) http://headsoft.com.au/index.php?category=vjoy
***

# WiiBalanceWalker v0.5 progress over v0.4:
### WiiBalanceWalker v0.5 progress over v0.4:
o Virtual joystick Support for x64 systems
o Can send values directly measured from each of the load sensors, to the virtual joystick interface.
o Instructions for adding / removing bluetooth devices updated for windows 10.
o Easier to make permanent connections with the balance board by using permanent PIN code
o New startup options makes usage even easier
o New option to tare the balance board (brings all current measurments to zero. use this button while you're off the balance board)
o New option to tare the balance board (makes all current measurments zero. use this button while you're off the balance board)
o Measured values are now in real kilograms (previously they were 4 times too large)
o Added some helpful tooltips, try to hover your mouse over things to get some explanations.

Get your compiled archive in the [Releases section](https://github.com/lshachar/Wiibalancewalker/releases)
for virtual joystick support, [install vJoy by Shaul Eizikovich](http://vjoystick.sourceforge.net/site/index.php/download-a-install/download)
Get your compiled archive in the [Releases section](https://github.com/lshachar/Wiibalancewalker/releases)<br/>
For virtual joystick support, [install vJoy by Shaul Eizikovich](http://vjoystick.sourceforge.net/site/index.php/download-a-install/download)<br/>
Feel free to [put some bread in my jar](https://paypal.me/lshachar?locale.x=en_US), only if you feel like it!
12 changes: 6 additions & 6 deletions WiiBalanceWalker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WiiBalanceWalker", "WiiBala
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x64.ActiveCfg = Debug|x64
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x64.Build.0 = Debug|x64
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x86.ActiveCfg = Debug|x86
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x86.Build.0 = Debug|x86
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|Any CPU.Build.0 = Release|Any CPU
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x64.ActiveCfg = Release|x64
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x64.Build.0 = Release|x64
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x86.ActiveCfg = Release|x86
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
36 changes: 12 additions & 24 deletions WiiBalanceWalker/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 0 additions & 81 deletions WiiBalanceWalker/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using System.Text.RegularExpressions;
using System.Timers;
using System.Windows.Forms;
//using VJoyLibrary; // deprecated - vjoy by Headsoft
using WiimoteLib;

namespace WiiBalanceWalker
Expand All @@ -28,7 +27,6 @@ public partial class FormMain : Form
ActionList actionList = new ActionList();
Wiimote wiiDevice = new Wiimote();
DateTime jumpTime = DateTime.UtcNow;
//VJoy joyDevice = null; // deprecated - vjoy by Headsoft

bool setCenterOffset = false;
bool resetCenterOffsetPossible = false;
Expand All @@ -50,10 +48,6 @@ private void FormMain_Load(object sender, EventArgs e)

infoUpdateTimer.Elapsed += new ElapsedEventHandler(infoUpdateTimer_Elapsed);

// Setup a timer which prevents a VJoy popup message. // deprecated - Headsoft vJoy

// joyResetTimer.Elapsed += new ElapsedEventHandler(joyResetTimer_Elapsed); // deprecated - Headsoft vJoy

// Load trigger settings.

numericUpDown_TLR.Value = Properties.Settings.Default.TriggerLeftRight;
Expand Down Expand Up @@ -200,7 +194,6 @@ private void button_Connect_Click(object sender, EventArgs e)
if (checkBox_AutoTare.Checked)
zeroout.PerformClick();


break;
}
}
Expand Down Expand Up @@ -247,9 +240,6 @@ private void InfoUpdate()
var rwBottomRight = wiiDevice.WiimoteState.BalanceBoardState.SensorValuesKg.BottomRight;
var aButton = wiiDevice.WiimoteState.ButtonState.A;

float temp = rwTopLeft + rwTopRight + rwBottomLeft + rwBottomRight; // todo temp, I already see it's working fine so should be deleted.
sumup.Text = temp.ToString("0.0"); // todo

// The alternative .SensorValuesRaw is meaningless in terms of actual weight. not adjusted with 0KG, 17KG and 34KG calibration data.

//var rwTopLeft = wiiDevice.WiimoteState.BalanceBoardState.SensorValuesRaw.TopLeft - wiiDevice.WiimoteState.BalanceBoardState.CalibrationInfo.Kg0.TopLeft;
Expand Down Expand Up @@ -468,11 +458,6 @@ private void InfoUpdate()

if (Double.IsNaN(joyX)) joyX = 0.0; // send the dead center value if not enough weight is on the board
if (Double.IsNaN(joyY)) joyY = 0.0;

// Set new values.
//joyDevice.SetXAxis(0, (short)joyX); // deprecated - headsoft vJoy
//joyDevice.SetYAxis(0, (short)joyY);
//joyDevice.Update(0);
}

if (!checkBox_Send4LoadSensors.Checked)
Expand All @@ -483,36 +468,10 @@ private void InfoUpdate()

if (checkBox_ShowValuesInConsole.Checked)
{
//Console.WriteLine(values, "formMain");
BalanceWalker.FormMain.consoleBoxWriteLine(values);
}
VJoyFeeder.Setjoystick((int)joyX, (int)joyY, (int)(rwTopLeft * 100), (int)(rwTopRight * 100), (int)(rwBottomLeft * 100), (int)(rwBottomRight * 100), aButton);
}

/*
// Deprecated - Headsoft's vjoy code
{
// Uses Int16 ( -32767 to +32767 ) where 0 is the center. Multiplied by 2 because realistic usage is between the 30-70% ratio.
var joyX = (brX * 655.34 + -32767.0) * 2.0;
var joyY = (brY * 655.34 + -32767.0) * 2.0;
// Limit values to Int16, you cannot just (cast) or Convert.ToIn16() as the value '+ - sign' may invert.
if (joyX < short.MinValue) joyX = short.MinValue;
if (joyY < short.MinValue) joyY = short.MinValue;
if (joyX > short.MaxValue) joyX = short.MaxValue;
if (joyY > short.MaxValue) joyY = short.MaxValue;
// Set new values.
joyDevice.SetXAxis(0, (short)joyX);
joyDevice.SetYAxis(0, (short)joyY);
joyDevice.Update(0);
} // Deprecated - Headsoft's vjoy code
*/

}

private void checkBox_EnableJoystick_CheckedChanged(object sender, EventArgs e)
Expand All @@ -534,46 +493,6 @@ private void checkBox_EnableJoystick_CheckedChanged(object sender, EventArgs e)
checkBox_SendCGtoXY.Enabled = status;
checkBox_Send4LoadSensors.Enabled = status;
}
/* {
// Start joystick emulator.
try
{
joyDevice = new VJoy();
joyDevice.Initialize();
joyDevice.Reset();
joyDevice.Update(0);
}
catch (Exception ex)
{
// VJoy.DLL missing from .EXE folder or project built as 'Any CPU' and DLL is 32-bit only.
infoUpdateTimer.Enabled = false;
MessageBox.Show(ex.Message, "VJoy Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
joyResetTimer.Enabled = true;
// Show reminder ( if not being changed by load settings ) and save settings.
var isChecked = ((CheckBox)sender).Checked;
if (isChecked)
{
if (Properties.Settings.Default.EnableJoystick == false)
{
MessageBox.Show("Actions still apply! Set 'Do Nothing' for any movement conflicts.\r\n\r\nRequires Headsoft VJoy driver to be installed.", "Reminder", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
Properties.Settings.Default.EnableJoystick = isChecked;
Properties.Settings.Default.Save();
}*/ // Deprecated - Headsoft's vjoy code



/* void joyResetTimer_Elapsed(object sender, ElapsedEventArgs e) // Deprecated - Headsoft vjoy
{
joyDevice.Initialize();
}*/

private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
{
Expand Down
3 changes: 0 additions & 3 deletions WiiBalanceWalker/FormMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="checkBox_Send4LoadSensors.ToolTip" xml:space="preserve">
<value>Send each of the 4 load sensors of the Wii Balance board to the VJoy device, using Axis: Z, RX, RY, RZ.
Note: these values are multiplied by 100 before being sent out to the vJoy interface.
Expand Down
Binary file removed WiiBalanceWalker/VJoy.dll
Binary file not shown.
Loading

0 comments on commit 773ebe6

Please sign in to comment.