Jump to content

zitronen

Members
  • Posts

    692
  • Joined

  • Last visited

Everything posted by zitronen

  1. Yeah don't use delay(), since it stops everything, really bad. instead of GlobalTimer++; delay(1); Do it this way now = micros(); dt = now - dtOld; if (dt >= 1000) { dtOld = now; GlobalTimer++; } Also do you really need to update stuff every 60ms?
  2. You can try increasing the size of the rx buffer in HardwareSerial.h in your Arduino install.  If that doesn't work or if you are very low on SRAM you can turn down the refresh rate in the plugin config file. Very cool setup btw!
  3. Hmm it's strange KSP doens't recognize it. Does it not show up as a joystick in windows? If vJoy can see it then that might be the better option. If nothing works and you are really desperate I guess you can strip out the inside of the thing and replace it with your own electronics. I think there was also a joystick mod for KSP that allows you to bind more bottons and stuff, but can't seem to remember what it's called now.
  4. Hey @c4ooo and everyone, instead of using the full int16, how about just go lazy and and do "FixedpointAngle = Round(Angle x 50)"? We lose some resolution, but get a nice and round resolution of 0.02 degrees and all people have to do in their arduino code is multiply the angle by 50. The trade off is resolution and ease of use. I tested @c4ooo's code, works great. The only thing is if you set a planet as a target there is no target angle. I think it's because "TargetExists()" is checking for a vessel.
  5. @c4ooo sorry I was away for 3 weeks on holiday. I think the 14 byte version should work! Thanks for all the hard work.
  6. Guys can your please test this: https://sites.google.com/site/zitronfiles/WheelsCollection.zip I fixed the other two wheels so they should all work now. If this is working I'll upload it to spacedock.
  7. Something must have changed in the wheel module. A different axis was used to rotate the mesh of the wheel. The effect is purely graphical. I rotated things around a bit in KSP part tools and rebuilt the model. Unfortunately I don't have a much time this week to finish the other two wheels (gf has higher priority than KSP right now ), will have to wait till the weekend. Once it's all finished I'll update the spacedock files and ckan should have the correct version again.
  8. @TheKurgan @Casper_83 Sorry for the delay, can you please test the patch for the Kerchelin Extreme wheel here: https://sites.google.com/site/zitronfiles/RollKage%20Kerchelin%20Extreme.zip If it's working I'll do the same thing for the other wheels.
  9. I haven't got much time to test these. Has any other mods got similar problems? Maybe something needs to be changed in the cfg files?
  10. @wile1411 I think your plan of splitting the USB HID keyboard stuff and the serial stuff to 2 arduinos is a good one, it's what I use. I would suggest not to plan too far ahead, start with something simple, once you get it working try something more complicated. Do you have the debug log? The win 10 has issues, you might need a different usb-serial converter, I'm not sure what the current status of the Linux version is.
  11. You need to do it like the example code: if (digitalRead(SASPIN)) { //--------- This is how you do main controls MainControls(SAS, HIGH); setSASMode(SMPrograde); //setting SAS mode //setNavballMode(NAVBallSURFACE); //setting navball mode } else { //setNavballMode(NAVBallTARGET); MainControls(SAS, LOW); } MainControls(SAS, HIGH/LOW) does the actual turning on and off. Since you are using win10, check using the example code to see if you are getting any control inputs at all.
  12. That's some dedication man! I think everyone who have attempted to make one of these can appreciate just how much work it takes to make one of these (so many **** wires!!!). Well done!
  13. Pretty awesome! You've managed to get up the steep learning curve. You can use dtostrf() to format numbers for fixed width display, and I suggest including Time to AP on your LCD, really useful for launch efficiency.
  14. I am 90% sure it is the actual absolute density in kg/m^3. If you want a density ratio then you will need to know the sea level density of each planet, but if you just want a ratio to 1 (Kerbin) atmosphere you just need to divide it by 1.225. Please make sure you put your own code in the "input()" function, don't put stuff in "loop()" since it need to run at a much faster rate where as "input()" is only ran when the arduino received a packet. Example: if (KSPBoardReceiveData()){ deadtimeOld = now; returnValue = id; switch(id) { case 0: //Handshake packet Handshake(); break; case 1: Indicators(); //PUT YOUR CODE HERE display.show(....) break; }
  15. Did this just start happening? Never had that problem before. Although it could be something to do with the Mac version, not sure if the people working on the Mac port are still around... Oh and I've been wanting to do a UDP based IO for a while, if you get something working we can figure out how to include it.
  16. I tested with 1.3.1, still seems to work fine. If anyone have problems let me know.
  17. Yeah for aircraft direction hold you just need to turn heading error into roll angle command (with a PID on roll angle), and limit max roll to say 40 deg.
  18. A basic aircraft autopilot that flies to way points is possible. For launch you don't really need prograde vector. A simple pitch vs altitude map and throttle based on time to AP could be enough for some rockets.
  19. OOh, you need to put your code in the "input()" section, "output" is for switches and axis controls which are normally sent to KSP at 40Hz. Also I wonder if WaitForIdle(); in the writeobject function is what's causing the problems
×
×
  • Create New...