Jump to content

Zalta

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Zalta

  1. I don't have framerate issues, but my PC is verry powerfull. As said Zitronen, removing the event is not a pretty solution, because we force the plugin to work everytime, and it's bad. I have delays problem with my code, the response time is something like .1 or .2 seconds. I think I'm going to give up, and install Windows 7 in dual-boot.
  2. Okay, have you try the version "dontwork" on Windows 7 it May be better. Have you tried with other baudrate ? Edit : I fork with my code here : https://github.com/zaltanar/KSPSerialIO Edit2 : I didn't reproduce your disparition bug. The only problem i had with the Tracking Station was i had to attempt twice before control the ship. PS : i'm not using mods when i test
  3. I will share it, first i have to understand how github works and how my new IDE works with Github. Can you try this : http://www.filedropper.com/kspserialio You will find : KSPSerialIO.dll_work KSPSerialIO.dll_dontwork Just rename one of thoose in KSPSerialIO.dll and test. Could you test both ? The working one is without event, the don't working one is the event. (Both use PsimaxSerial) Use this demo : https://sites.google.com/site/zitronfiles/KSPIODemo13.zip Just check the Baudrate in the config file and the Arduino program before use, it might be different. Because like zitronen said, it's better to use event.
  4. Yes BytesToRead always return 0 with OpenNETCF. I already check the original code with PsimaxSerial, that don't work, the reason it's not the event, it's the Arduino that do not receive well packets. But packets sent with Psimax/Original code and Psimax/event removed are the same ... My Arduino is so silly ... I use 0.17.4 code (git master) and Demo13.
  5. The solution is to remove the event, and work with Update() or FixedUpdate(). Edit : I found a working solution, it's working now :D:D 1/I replace the function call by the event by a simple function (just change name and parameters). 2/I create and Update() in the Class KSPSerialPort to call the function 3/ I use PsimaxSerial.dll, it works better than the OpenNETCF dll, because the Port.BytesToRead seems to be broken too. I have to continue testing to check if everything is fine.
  6. Ok so i made other tests : I use the PsimaxSerial library made by Marzubus. 1/Use Marzubus version (0.17.0) : Nothing more happen 2/I use PsimaxSerial in your 0.17.4 code and modify SerialPort class a little to use PsimaxSerial : Nothing more. I'm out of idea, if someone have a suggestion.
  7. Hum, i can have some ideas like everyone, but i'm not skilled for that. I already read and try everything from there ... The problem is that the Port_ReceivedEvent no received event. I'm pretty sure that the delegate ( Port.DataReceived += Port_ReceivedEvent;) works well, because i use a Debug to check. So the problem could come from the SerialPort.dll, but i understand nothing in the SerialPort source code, too complex for me. Maybe (maybe !!!) the SerialPort.dll is too old, but you should have a reason to use it. i don't know why your are not using this Class : https://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx So for the moment i try some experiments, i'm trying to use the System.IO class. But i'm not a programmer, so i'm just playing with luck.
  8. For the Windows 10 problem, maybe this could help : I compile myself your code (0.17.4) and the SerialPort.dll for .NET 4.5 and add some debugging lines. I think the problem is from the event or the delegate (i don't remember how this work in C#) The computer receive the handshake from the Arduino, i saw it with a Serial monitor. But the Plugin never go in this method : I put a long wait in this loop to be shure :
  9. Hi, Thanks for developing this project. I'm trying since this morning to make it working, a lot of tries ....... I'm having issue with "Display Not Found" and Windows 10, i try a lot of solutions like changing rate, refresh, some waiting variables, version 0.17.3 and 0.17.4(with Demo13), but nothing worked. KSPSerialIO: trying default port COM3 KSPSerialIO: KSP Display not found KSPSerialIO: trying port \Device\Serial0 - COM1 KSPSerialIO: KSP Display not found KSPSerialIO: trying port \Device\USBSER000 - COM3 KSPSerialIO: KSP Display not found I investigated with a Debug() method in the Arduino Code and a Serial Monitor. -The plugin test the default COM (COM3 for my Arduino, another one, and again the Arduino but with a different name) -The KSPBoardReceiveData() were true just one time : for the handshake -The handshake sent by plugin is : BE EF 04 00 03 01 04 02 -The handshake sent by Arduino is : BE EF 04 00 01 02 03 04 -In your plugin code at github i see that M1/M2/M3 should be 03/01/04 I suspect the reason is that handshake response from Arduino to Plugin is not 03/01/04, because of this code : if ((HPacket.M1 == 3) && (HPacket.M2 == 1) && (HPacket.M3 == 4)) { DisplayFound = true; } else { DisplayFound = false; } But i also saw that : HPacket = new HandShakePacket(); HPacket.id = HSPid; HPacket.M1 = 1; HPacket.M2 = 2; HPacket.M3 = 3; i'm totaly lost ... I'm suspecting a handshake problem, but i don't know how to compile your source code to try some modifications (like place the debug handshake function HandShake()).
×
×
  • Create New...