Skip to content

Commit 773ebe6

Browse files
committed
Remove deprecated vjoy code and files
1 parent 978e6f3 commit 773ebe6

14 files changed

+51
-374
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
[Dd]ebugPublic/
1919
[Rr]elease/
2020
[Rr]eleases/
21-
x64/
22-
x86/
21+
#x64/
22+
#x86/
2323
[Aa][Rr][Mm]/
2424
[Aa][Rr][Mm]64/
2525
bld/

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
# WiiBalanceWalker v0.5 - by Shachar Liberman
22
## WiiBalanceWalker v0.4 and before - Released by Richard Perry from GreyCube.com - Under the Microsoft Public License.
3+
4+
[Uses lshachar's WiimoteLib DLL ](https://github.com/lshachar/WiimoteLib)<br/>
5+
[Uses the 32Feet.NET bluetooth DLL](http://32feet.codeplex.com)<br/>
6+
[Uses vJoy device driver (by Shaul Eizikovich)]( http://vjoystick.sourceforge.net/)<br/>
7+
(Previous to v0.5 [VJoy by headsoft](http://headsoft.com.au/index.php?category=vjoy) was used)<br/>
38
***
4-
released for windows 10 x64 systems, x86 should be supported too.
59

6-
Uses lshachar's WiimoteLib DLL: https://github.com/lshachar/WiimoteLib
7-
Uses the 32Feet.NET bluetooth DLL: http://32feet.codeplex.com/
8-
Uses vJoy device driver (by Shaul Eizikovich): http://vjoystick.sourceforge.net/
9-
(Previous to WiiBalanceWalker v0.5
10-
VJoy by headsoft was used) http://headsoft.com.au/index.php?category=vjoy
11-
***
12-
13-
# WiiBalanceWalker v0.5 progress over v0.4:
10+
### WiiBalanceWalker v0.5 progress over v0.4:
1411
o Virtual joystick Support for x64 systems
1512
o Can send values directly measured from each of the load sensors, to the virtual joystick interface.
1613
o Instructions for adding / removing bluetooth devices updated for windows 10.
1714
o Easier to make permanent connections with the balance board by using permanent PIN code
1815
o New startup options makes usage even easier
19-
o New option to tare the balance board (brings all current measurments to zero. use this button while you're off the balance board)
16+
o New option to tare the balance board (makes all current measurments zero. use this button while you're off the balance board)
2017
o Measured values are now in real kilograms (previously they were 4 times too large)
2118
o Added some helpful tooltips, try to hover your mouse over things to get some explanations.
2219

23-
Get your compiled archive in the [Releases section](https://github.com/lshachar/Wiibalancewalker/releases)
24-
for virtual joystick support, [install vJoy by Shaul Eizikovich](http://vjoystick.sourceforge.net/site/index.php/download-a-install/download)
20+
Get your compiled archive in the [Releases section](https://github.com/lshachar/Wiibalancewalker/releases)<br/>
21+
For virtual joystick support, [install vJoy by Shaul Eizikovich](http://vjoystick.sourceforge.net/site/index.php/download-a-install/download)<br/>
22+
Feel free to [put some bread in my jar](https://paypal.me/lshachar?locale.x=en_US), only if you feel like it!

WiiBalanceWalker.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WiiBalanceWalker", "WiiBala
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
10+
Debug|x64 = Debug|x64
1111
Debug|x86 = Debug|x86
12-
Release|Any CPU = Release|Any CPU
12+
Release|x64 = Release|x64
1313
Release|x86 = Release|x86
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17-
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x64.ActiveCfg = Debug|x64
17+
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x64.Build.0 = Debug|x64
1818
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x86.ActiveCfg = Debug|x86
1919
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Debug|x86.Build.0 = Debug|x86
20-
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x64.ActiveCfg = Release|x64
21+
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x64.Build.0 = Release|x64
2222
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x86.ActiveCfg = Release|x86
2323
{6BAAAAB3-54E0-4D21-A891-1CD69CEB36AF}.Release|x86.Build.0 = Release|x86
2424
EndGlobalSection

WiiBalanceWalker/FormMain.Designer.cs

Lines changed: 12 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WiiBalanceWalker/FormMain.cs

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using System.Text.RegularExpressions;
1616
using System.Timers;
1717
using System.Windows.Forms;
18-
//using VJoyLibrary; // deprecated - vjoy by Headsoft
1918
using WiimoteLib;
2019

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

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

5149
infoUpdateTimer.Elapsed += new ElapsedEventHandler(infoUpdateTimer_Elapsed);
5250

53-
// Setup a timer which prevents a VJoy popup message. // deprecated - Headsoft vJoy
54-
55-
// joyResetTimer.Elapsed += new ElapsedEventHandler(joyResetTimer_Elapsed); // deprecated - Headsoft vJoy
56-
5751
// Load trigger settings.
5852

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

203-
204197
break;
205198
}
206199
}
@@ -247,9 +240,6 @@ private void InfoUpdate()
247240
var rwBottomRight = wiiDevice.WiimoteState.BalanceBoardState.SensorValuesKg.BottomRight;
248241
var aButton = wiiDevice.WiimoteState.ButtonState.A;
249242

250-
float temp = rwTopLeft + rwTopRight + rwBottomLeft + rwBottomRight; // todo temp, I already see it's working fine so should be deleted.
251-
sumup.Text = temp.ToString("0.0"); // todo
252-
253243
// The alternative .SensorValuesRaw is meaningless in terms of actual weight. not adjusted with 0KG, 17KG and 34KG calibration data.
254244

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

469459
if (Double.IsNaN(joyX)) joyX = 0.0; // send the dead center value if not enough weight is on the board
470460
if (Double.IsNaN(joyY)) joyY = 0.0;
471-
472-
// Set new values.
473-
//joyDevice.SetXAxis(0, (short)joyX); // deprecated - headsoft vJoy
474-
//joyDevice.SetYAxis(0, (short)joyY);
475-
//joyDevice.Update(0);
476461
}
477462

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

484469
if (checkBox_ShowValuesInConsole.Checked)
485470
{
486-
//Console.WriteLine(values, "formMain");
487471
BalanceWalker.FormMain.consoleBoxWriteLine(values);
488472
}
489473
VJoyFeeder.Setjoystick((int)joyX, (int)joyY, (int)(rwTopLeft * 100), (int)(rwTopRight * 100), (int)(rwBottomLeft * 100), (int)(rwBottomRight * 100), aButton);
490474
}
491-
492-
/*
493-
// Deprecated - Headsoft's vjoy code
494-
{
495-
// Uses Int16 ( -32767 to +32767 ) where 0 is the center. Multiplied by 2 because realistic usage is between the 30-70% ratio.
496-
497-
var joyX = (brX * 655.34 + -32767.0) * 2.0;
498-
var joyY = (brY * 655.34 + -32767.0) * 2.0;
499-
500-
// Limit values to Int16, you cannot just (cast) or Convert.ToIn16() as the value '+ - sign' may invert.
501-
502-
if (joyX < short.MinValue) joyX = short.MinValue;
503-
if (joyY < short.MinValue) joyY = short.MinValue;
504-
505-
if (joyX > short.MaxValue) joyX = short.MaxValue;
506-
if (joyY > short.MaxValue) joyY = short.MaxValue;
507-
508-
// Set new values.
509-
510-
joyDevice.SetXAxis(0, (short)joyX);
511-
joyDevice.SetYAxis(0, (short)joyY);
512-
joyDevice.Update(0);
513-
} // Deprecated - Headsoft's vjoy code
514-
*/
515-
516475
}
517476

518477
private void checkBox_EnableJoystick_CheckedChanged(object sender, EventArgs e)
@@ -534,46 +493,6 @@ private void checkBox_EnableJoystick_CheckedChanged(object sender, EventArgs e)
534493
checkBox_SendCGtoXY.Enabled = status;
535494
checkBox_Send4LoadSensors.Enabled = status;
536495
}
537-
/* {
538-
// Start joystick emulator.
539-
540-
try
541-
{
542-
joyDevice = new VJoy();
543-
joyDevice.Initialize();
544-
joyDevice.Reset();
545-
joyDevice.Update(0);
546-
}
547-
catch (Exception ex)
548-
{
549-
// VJoy.DLL missing from .EXE folder or project built as 'Any CPU' and DLL is 32-bit only.
550-
551-
infoUpdateTimer.Enabled = false;
552-
MessageBox.Show(ex.Message, "VJoy Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
553-
}
554-
555-
joyResetTimer.Enabled = true;
556-
557-
// Show reminder ( if not being changed by load settings ) and save settings.
558-
559-
var isChecked = ((CheckBox)sender).Checked;
560-
if (isChecked)
561-
{
562-
if (Properties.Settings.Default.EnableJoystick == false)
563-
{
564-
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);
565-
}
566-
}
567-
Properties.Settings.Default.EnableJoystick = isChecked;
568-
Properties.Settings.Default.Save();
569-
}*/ // Deprecated - Headsoft's vjoy code
570-
571-
572-
573-
/* void joyResetTimer_Elapsed(object sender, ElapsedEventArgs e) // Deprecated - Headsoft vjoy
574-
{
575-
joyDevice.Initialize();
576-
}*/
577496

578497
private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
579498
{

WiiBalanceWalker/FormMain.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@
120120
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123-
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124-
<value>17, 17</value>
125-
</metadata>
126123
<data name="checkBox_Send4LoadSensors.ToolTip" xml:space="preserve">
127124
<value>Send each of the 4 load sensors of the Wii Balance board to the VJoy device, using Axis: Z, RX, RY, RZ.
128125
Note: these values are multiplied by 100 before being sent out to the vJoy interface.

WiiBalanceWalker/VJoy.dll

-92 KB
Binary file not shown.

0 commit comments

Comments
 (0)