-
Posts
692 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by zitronen
-
Any reason why you are using 9600 for serial, not faster? Default should be 38400, but use fastest speed your board supports. lcd.clear() might be slow, if you are overwriting the display you could get rid of it. Otherwise I don't know? Have you tried just printing a simple line and see if that works?
-
LiquidCrystal possibly, SoftwareSerial can definitely cause problems. Do you need to use another serial port? I would recommend getting a board with 2 hardware serial ports rather than using softwareserial which is not only slow but also locks up the processor when it's working, which will lead to packet loss.
-
Update 0.19.3b: Changes: Ok so not sure when this happened, but it seems you no longer have to disable SAS to update vessel controls, so the annoy issue of having to disable SAS to move an axis is gone (the whole business with SASTol no longer an issue, it now doesn't do anything). Now the axis control behaves like normal joystick input. I didn't do anything apart from remove the check and doing some testing. Please let me know if this is actually fixed, that would be great! Thanks to @c4ooo for letting me know. Also recompiled against 1.10.1 Plugin download link: https://sites.google.com/site/zitronfiles/KSPSerialIO_019_3b.zip Arduino code dowload (same as before): https://sites.google.com/site/zitronfiles/KSPIODemo17.zip Basically what @Freshmeat said. Because we use the serial port, and need to support lower end arduino boards without a lot of RAM, we can't just send all the data. That's the limitation of this plugin. I never thought people would want to sending so much data to the arduino at the beginning. Surely 250 bytes ought to be enough for everybody.
-
In the config file: Enable value settings for axes: 0: The internal value (supplied by KSP) is always used. 1: The external value (read from serial packet) is always used. 2: If the internal value is not zero use it, otherwise use the external value. (Now default!!!) 3: If the external value is not zero use it, otherwise use the internal value. So if you set ThrottleEnable to 3, then the plugin will use your arduino throttle when it's not 0. You could for example have a switch to only send 0 when it's off and send analog input when it's on.
-
Unfortunately not right now. I think we talked about it back in the days. Getting more info in the controlpacket is easy, but getting things working with other mods will be annoying, you have to worry about which version of KSPSerialIO supports which version of AGE, for which version of KSP. When KSP updates you have to make sure both mods are updated. Then also you have to make sure things don't break for people who don't use AGE... An easier work around is just to use an Arduino Leo in keyboard emulation mode and bind the keys to AG(R)E.
-
Hi @OKB_Carba I figured out what's wrong. Changing SAS mode only works when SAS is already on! Completely forgot about this. It was designed to be used with more than one switches, one to turn SAS on, and others to change mode. So if you have two pins, you can do this: if (digitalRead(SASPIN)) { //--------- This is how you do main controls MainControls(SAS, HIGH); } else { MainControls(SAS, LOW); } if (digitalRead(CG1PIN)) setSASMode(SMPrograde); //setting SAS mode to prograde else setSASMode(SMSAS); //setting SAS mode to normal If you only want to use a single switch you will have to manually code something in the if statement like (not tested, but should work): if (inputpin == high) { MainControls(SAS, HIGH); if ((ControlStatus(AGSAS) == True) && (getSASMode() != SMPrograde)) //if control group SAS is on and not in prograde mode setSASMode(SMPrograde) else ... } else ... Sorry about the confusion. Unfortunately, because the fuel code I stole from mechjeb only works by traversing through connection nodes, surface attached engines don't work. I have no idea how to fix this, I had to copy stuff from more competent people just to get fuel working.
-
Ah I think it's because you are using MainControls(PROGRADE, HIGH); If you set MainControls(PROGRADE = 8) you are actually turning on action group 3. The list of things that can be controlled by MainControls() are //Action group statuses #define AGSAS 0 #define AGRCS 1 #define AGLight 2 #define AGGear 3 #define AGBrakes 4 #define AGAbort 5 #define AGCustom01 6 #define AGCustom02 7 #define AGCustom03 8 #define AGCustom04 9 #define AGCustom05 10 #define AGCustom06 11 #define AGCustom07 12 #define AGCustom08 13 #define AGCustom09 14 #define AGCustom10 15 What you should do is else if (digitalRead(PROGRADEPIN)){ //same estructure as above MainControls(SAS, HIGH); //Input enum for PROGRADE SAS Mode setSASMode(SMPrograde); //Setting SMPrograde }
-
OK I fixed it! Update 0.19.2: Changes: Fixed very old bug of auto detection and connection with high number (>10) COM ports, thanks to detective work from @Jimbofarrar Plugin download link: https://sites.google.com/site/zitronfiles/KSPSerialIO_019_2.zip Arduino code dowload: https://sites.google.com/site/zitronfiles/KSPIODemo17.zip