Ver código fonte

Reset GUI on disconnect, mention serial driver in Readme

Thomas Buck 9 anos atrás
pai
commit
a39f708d06

+ 2
- 0
README.md Ver arquivo

@@ -2,6 +2,8 @@
2 2
 
3 3
 This project emulates a virtual Gamepad using input data from a serial port. This can be used to enable Flysky CT6A / CT6B compatible transmitters (Turbobrix, Exceed, Modelcraft) in games or simulators.
4 4
 
5
+Depending on the USB-Serial converter stick included with your Transmitter, you may need to install the [SiLabs CP210x driver](https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx).
6
+
5 7
 You need to install the virtual userspace IOKit HID driver [foohid](https://github.com/unbit/foohid).
6 8
 
7 9
 Download the latest release **including foohid** [here on GitHub](https://github.com/xythobuz/SerialGamepad/releases).

BIN
SerialGamepad.xcodeproj/project.xcworkspace/xcuserdata/thomas.xcuserdatad/UserInterfaceState.xcuserstate Ver arquivo


+ 1
- 1
SerialGamepad/Info.plist Ver arquivo

@@ -21,7 +21,7 @@
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>91</string>
24
+	<string>93</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>

+ 4
- 0
SerialGamepad/Thread.m Ver arquivo

@@ -159,6 +159,10 @@ enum ThreadState {
159 159
         }
160 160
     }
161 161
     
162
+    // Ensure the GUI is always reset after clicking Disconnect
163
+    NSArray *zero = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], [NSNumber numberWithInt:0], [NSNumber numberWithInt:0], [NSNumber numberWithInt:0], [NSNumber numberWithInt:0], [NSNumber numberWithInt:0], nil];
164
+    [mainWindow performSelectorOnMainThread:@selector(setChannels:) withObject:zero waitUntilDone:NO];
165
+    
162 166
     close(fd);
163 167
     NSLog(@"Connection closed...\n");
164 168
     fd = -1;

Carregando…
Cancelar
Salvar