Jump to content

thatdude624

Members
  • Posts

    11
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Bottle Rocketeer
  1. Hurrah, I got it working! I modified the library to send messages to a local TCP port to a Java program which is in charge of Serial data handling! Right now, the Java server simply sends all incoming TCP bytes through to the Serial port, but I could easily make it work the other way around. In theory, anyway. Now the problem is the Arduino code isn't properly parsing the incoming packets, and the packets aren't even the same size. I'll write my own Arduino packet parser later. With the data going into Java, there's also a possibility of making a second monitor with aircraft instruments that you could never afford to get working with an Arduino, but I'll start with just a custom controller. Thanks for the help!
  2. Couldn't get your one working. COM23 couldn't open "acess denied" and the weird \\.\COM23 trick didn't work, and defaulted to COM1, which made it lag beyond measure on the simplest ship. I can't make it a COM port below 10 because I don't have much of a say in what port numbers Windows decides to allocate. It's the result of using many Arduino's/Serial adaptors on many USB ports. I've only got Windows 10 on here, unfortunately. I should perhaps try and install Linux Mint alongside windows, but it seems a bit overkill to just use it for KSP. As for building it myself, it's now complaining that the provided SerialPort.dll is built for version 4.5 for some reason. It compiles without that reference, but now it's throwing an exception with the name "value", seemingly on the line "Port.PortName = PortNumber;". I'm not sure, but I'd guess this is a sort of NullPointerException? At least KSP's loading the mod now.
  3. I do, I can help! I downloaded Visual Studio and tried to edit the mod's EventCallDirectly(), which seems to be responsible for Serial receiving. I commented out everything and instead wrote "DisplayFound = true;//assume it worked", so it would succeed opening the first port it finds (the default port, which I know is the right one). Unfortunately, compiling isn't going so well. Or rather, it compiles, but KSP doesn't like it: [ERR 20:58:30.438] AssemblyLoader: Exception loading 'KSPSerialIO': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool) at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 Additional information about this exception: System.TypeLoadException: Could not load type 'KSPSerialIO.KSPSerialPort' from assembly 'KSPSerialIO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. I've never used C# before, much less for Unity mod development, and honestly I'm surprised my attempt got this far. Perhaps it's because of how I tried to link the DLLs... I've seen a lot of mods use networking to send data in/out of KSP. I know that Serial works in Java, so I could perhaps write a network to COM port app that runs in the background for Windows 10. Though adding networking is probably no simple task. ...Honestly, I'd be happy with just Serial output from KSP for Win10 to work for my project
  4. Hey guys, trying to get this working on my PC, but it's not picking up any of my Arduinos. I've tried an Uno, a Dumeliavore (or however that one's spelt) and a Due, none of them are working, and it's not finding the "display". Logs look like this: ... [WRN 16:35:24.296] [HighLogic]: =========================== Scene Change : From SPACECENTER to FLIGHT (Async) ===================== [WRN 16:35:26.647] ApplicationLauncher already exist, destroying this instance [LOG 16:35:26.655] AddonLoader: Instantiating addon 'NavWaypoint' from assembly 'KSP' [LOG 16:35:26.661] AddonLoader: Instantiating addon 'KSPSerialPort' from assembly 'KSPSerialIO' [LOG 16:35:26.665] KSPSerialIO: Version 0.17.3 [LOG 16:35:26.667] KSPSerialIO: Getting serial ports... [LOG 16:35:26.669] KSPSerialIO: Output packet size: 189/255 [LOG 16:35:26.673] KSPSerialIO: Found 4 serial ports [LOG 16:35:26.674] KSPSerialIO: trying default port COM20 [LOG 16:35:26.736] Error opening serial port COM20: CreateFile Failed: 2 [LOG 16:35:26.739] KSPSerialIO: trying port \Device\Serial0 - COM1 [LOG 16:35:33.274] KSPSerialIO: KSP Display not found [LOG 16:35:33.276] KSPSerialIO: trying port \Device\VCP0 - COM20 [LOG 16:35:33.278] Error opening serial port COM20: CreateFile Failed: 2 [LOG 16:35:33.280] KSPSerialIO: trying port \Device\USBSER000 - COM23 [LOG 16:35:33.282] Error opening serial port COM23: CreateFile Failed: 2 [LOG 16:35:33.284] AddonLoader: Instantiating addon 'KSPSerialIO' from assembly 'KSPSerialIO' [LOG 16:35:33.330] ------------------- initializing flight mode... ------------------ ... COM20 and COM23 are both Arduinos, and both of them have the unmodified Arduino example sketch loaded. COM1 is my hardware RS232 port. Any attempt to connect to an Arduino results in a "CreateFile Failed: 2" error, and the port is never opened as neither of the Arduino's reset or receive data. Not sure why it's found 4 COM ports though, there's only 3 and it only tries 3 (well, 4 since it tries the default one twice. Perhaps that's why it reports 4...). Probably not important. Running Windows 10 64 bit, latest KSP through Steam (also tried launching outside of Stream with Run as Admin, no luck), fresh/unmodded install except for this one. It seems Windows 10 has some problems with this mod, any suggestions? Since the only port not failing to open is my hardware port, I might try and find an RS232 to TTL adapter, but I would much prefer the USB COM port to work. EDIT: I've made progress. using the default port name "\\.\COM23" I was able to get it connecting to COM23 successfully. Don't ask me why that works, it just does somehow. I read somewhere that that's needed to use COM ports higher than 9, and it worked. Anyhow, I'm now picking this up: At the top-left is the handshake packet sent by KSP, to which the Arduino promptly replies to in the packet to the right. This was received 5 seconds after the Arduino was reset with the opening of the COM port, as specified in the config file, even though the Arduino finished booting after around 1 second. The problem is, there are nothing sent after this, and it seems KSP never receives the response handshake. With the output() method uncommented, the Arduino will hopelessly spam the port with new data packets, but KSP doesn't seem to notice. Eventually KSP times out. TL;DR: it seems KSP can now send Serial, but not receive it. Normally, this wouldn't bother me at all; I can emulate a keyboard/mouse and simply control KSP like that, watching the response in those status packets. The problem, though, is that KSP is refusing to send those status packets entirely, as all Serial communication stops after that one handshake, presumably because it assumes it's not working. Can someone please make a version that doesn't rely on handshakes and just endlessly sends status packets instead? Someone posted a win10 fix, but the link's broken and I don't know how to compile it from source. I think just removing handshakes *should* do it, though.
  5. I doubt that's the problem. As I said earlier, it's not in a restricted directory like Program Files, and right-click running it as Administrator does not solve the problem either. Furthermore, as I also said earlier, it writes config changes just fine when using the controller, and graphics settings remain persistent on restarts of KSP as long as you don't attempt to map the Joystick. Writing changes to config still works fine while the Joystick is plugged in (as long as you don't attempt to map it) I can confirm the file is being written to the moment accept is pressed, and is updated with the correct, relevant information if configurations have been changed. The only way I could see antivirus being a problem here is if reading the words "Joystick 1" is exceptionally suspicious and must be avoided at all costs by the virus scanner. I doubt it. Anyway, my computer's running something and as much as I'd love to help fix this problem, rebooting won't be an option for the next hour or so. It's interesting that textide is having the same problem with his joystick too: If you have a gamepad or another joystick, could you try that? And perhaps include your Config file (under "\Kerbal Space Program\settings.cfg")
  6. More research: After finding my controller, I can map it as a Joystick just fine, with the accept button working as expected. Even weirder: After trying this, the settings menu retained its settings! I think I might know what the problem relates to. Whatever squad changed to overhaul the joystick controls changed how joystick controls are saved to the config file. Something with how those names are saved does not like my joystick, perhaps it saves the name of the joystick which contained strange unicode character like the trademark or copyright symbol or something. That could explain why it won't confirm, and why some settings are messed up on reset. However, I know absolutely nothing about how Unity or KSP works, so this is purely a guess. It seems to be related to the Logitech joysticks though. - - - Updated - - - Alright, tried to test my theory. I don't see anything too strange in the config. I have pitch mapped to the Force 3D Pro, and Yaw mapped to the Xbox 360 controller, named by KSP's Config file as "Joystick 1" and "Controller (Xbox 360 Wir." respectively at line 830 onwards. As before, the settings menu started going weird as soon as I tried to map my Joystick, but worked fine for the controller. Once again, graphics settings reset to default (but haven't actually changed, only in config" after attempting to map the joystick, but when deleting this config file and only ever attempting to map the controller this does not happen. Whoops, forgot to put the link to my config file! https://dl.dropboxusercontent.com/u/43744321/KSPDebug/settings.cfg
  7. I checked, those registry values are all correctly setup for 1600x800 fullscreen, and as before the game launches in 1600x800 fullscreen. It's just that entering and leaving the settings menu changes the resolution, unless you manually set it back to 1600x800 before clicking apply, because those fields reset for some reason. I've found that the texture quality, ground scatter etc. settings all also go back to default whenever the settings menu is opened, as with resolution, but for some weird reason the control mapping remains whatever I've set it to. It does not, even though the axes are not bound at all to start with, they all seem to start out as "none" by default and I obviously can't change them. Clicking clear binding in the popup, then moving the axis still doesn't fix the confirm button, unfortunately. - - - Updated - - - After some searching I've found someone had the same problem as me, interestingly with a very simmilar joystick model: http://forum.kerbalspaceprogram.com/threads/117066-Logitech-Extreme-3D-Pro-Axis-Bindings-Freeze Mine is the Force 3D Pro, which is almost identical to the Extreme 3D Pro except it has Force Feedback (which KSP doesn't support anyways), and it's a different colour. I think the drivers are the same too.
  8. Already attempted this, the popup appears on first attempt again. It also seems that changing the resolution to 1600x900 fullscreen, confirming (which immediately changes resolution as normal) then closing and restarting KSP will keep it at that resolution and it will stay fullscreen, but if you enter the settings menu it claims to be on 1280x270 windowed mode. Clicking apply/accept without touching anything in the settings mode will actually put it in windowed mode at that resolution, while changing it back to 1600x900 fullscreen and then applying will fix it. This all resets every reboot of KSP, and every time it goes back to default in the menu, but not in the game. It seems to affect the other settings as well. They do not reset when leaving and reentering the settings menu while KSP stays open. Running as admin doesn't fix this, and KSP isn't in program files or any restricted folder I'm not too bothered by this, but it may perhaps be related to this problem. Here's the mapping window. Clicking accept doesn't do anything, only cancel closes it. https://dl.dropboxusercontent.com/u/43744321/KSPDebug/2015-05-01_00004.jpg
  9. Sorry about that! Here's all relevant info. Interestingly, it no longer seems to show the joystick mapping thing on even the first attempt anymore. Verified Steam Cache, still doing it. Here's the only 2 relevant screenshots I could think of: http://imgur.com/a/M4AeJ The first shows KSP is version 1.0.0.830, and the other shows the locked up interface after clicking the pitch axis map button. also note the correctly mapped joystick button for translation/rotation switching. DxDiag with system info: https://dl.dropboxusercontent.com/u/43744321/KSPDebug/DxDiag.txt KSP output log: https://dl.dropboxusercontent.com/u/43744321/KSPDebug/output_log.txt
  10. Hello! KSP 1.0 adds overhauled joystick functionality and TrackIR support. I got trackIR working (and it's awesome) but my Logitech Force 3D Pro isn't mapping properly anymore. I remember being able to use it in the past. Basically, the problem is that when I go into settings, I select the axis I want to map (say Yaw), move the relevant axis and KSP correctly picks up what axis I moved, so the joystick is definitely working and detected. However, the "accept" button does nothing, it doesn't even close the popup window. The only way I can close it is by clicking cancel. If I try to map the axis again, the interface will disable and the mapping popup won't even show up. Since the confirm/cancel setting changes buttons at the bottom are still disabled, the only way to leave the settings menu is to switch to another settings tab (like audio) and confirm/cancel changes from there. Joystick buttons map fine as usual. Joystick drivers up to date and still works in other games. Running Windows 10 64 bit, KSP 1.0 through Steam. Model: "Logitech Force 3D Pro"
×
×
  • Create New...