Skip to content

Commit 0f0b084

Browse files
committed
controller support with both controller modes available
Controller button presses appear but do not change scores
1 parent 35820db commit 0f0b084

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
TELEOP,8
2+
AUTONOMOUS,9
3+
DEFENSIVERATINGPLUS,11,6
4+
DEFENSIVERATINGMINUS,1,10,6
5+
DEFENSE1CROSSMINUS,10,1
6+
DEFENSE1CROSSPLUS,1
7+
DEFENSE1ATTMINUS,11,10,1
8+
DEFENSE1ATTPLUS,11,1
9+
DEFENSE2CROSSMINUS,10,2
10+
DEFENSE2CROSSPLUS,2
11+
DEFENSE2ATTMINUS,11,10,2
12+
DEFENSE2ATTPLUS,11,2
13+
DEFENSE3CROSSMINUS,10,0
14+
DEFENSE3CROSSPLUS,0
15+
DEFENSE3ATTMINUS,11,10,0
16+
DEFENSE3ATTPLUS,11,0
17+
DEFENSE4CROSSMINUS,10,3
18+
DEFENSE4CROSSPLUS,3
19+
DEFENSE4ATTMINUS,11,10,3
20+
DEFENSE4ATTPLUS,11,3
21+
DEFENSE5CROSSMINUS,10,3,
22+
DEFENSE5CROSSPLUS,3,2
23+
DEFENSE5ATTMINUS,11,10,3,1
24+
DEFENSE5ATTPLUS,11,3,1
25+
HIGHSHOTMADEMINUS,10,5
26+
HIGHSHOTMADEPLUS,5
27+
HIGHSHOTATTMINUS,11,10,5
28+
HIGHSHOTATTPLUS,11,5
29+
LOWSHOTMADEMINUS,4,10
30+
LOWSHOTMADEPLUS,4
31+
LOWSHOTATTMINUS,11,10,4
32+
LOWSHOTATTPLUS,11,4
33+
CHALLENGESCALEPLUS,10,1
34+
FINISHEDSCORING,4,5
35+
36+

Controllers/Controllers.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ auto
33
auto
44
auto
55
auto
6+
auto
7+
auto
8+
auto
69
auto

GameInput.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ void tm1939LoadController(string controllername, int controllernumber)
8282
String buttons = new String('F', maxbuttons);
8383

8484
// Parse the second to nth items to set the T item in buttons
85-
for (int i = 1; i < Command.Length; i++)
85+
for (int i = 15; i < Command.Length; i++)
8686
{
87-
StringBuilder map = NewMethod(buttons);
87+
StringBuilder map = new StringBuilder(buttons);
8888
map[Int32.Parse(Command[i])] = 'T';
8989
buttons = map.ToString();
9090
}

MultipleJoysticks.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
112112
</EmbeddedResource>
113113
<None Include="ClassDiagram1.cd" />
114+
<None Include="Controllers\Controller%28GamepadF310%29.ctrl" />
115+
<None Include="Controllers\LogitechDualAction.ctrl" />
114116
<None Include="Controllers\PS%28R%29Gamepad.ctrl">
115117
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
116118
</None>

0 commit comments

Comments
 (0)