Jump to content

c4ooo

Members
  • Posts

    133
  • Joined

  • Last visited

Everything posted by c4ooo

  1. Hahaha thats dirt cheap compared to what i found. In the description it lists these pins: VCC, GND, DIN, CS, CLK The first two are self explanatory, but what exactly do the last 3 do? Also is there a built in resistor for the LEDs? Thanks
  2. I have considered the following layout: Pe Alt [8 7-segment displays] time to Pe [6 7-segment displays] Ap Alt [8 7-segment displays] time to Ap [6 7-segment displays] Vessel altitude (Alt / Radar Alt) [8 7-segment displays] time to node [6 7-segment displays] speed (orbit, target, surface, or delta-v left to complete maneuver) [5 7-segment displays] However this adds up to a total of 47 7-segment displays, and doesn't look as clean IMHO Edit: so it will end up being a big price tag
  3. Tips? Criticisms? Everything in white is where to cut mounting holes for switches, leds and other meters, and blue is space for text / other design elements. The 4 blue boxes in "rotation" and "translation" is where the joysticks will go.
  4. My alarm clock is the default alarm sound on my phone. Never hear it though becouse i always wake up exactly 5 minutes before my alarm sounds
  5. Mistake spotted in your example code getNavBallModr() should be "return VData.NavballSASMode >> 4". The way you have it, the function returns 16, 32, or 48, not 1, 2, and 3 Thanks for the merge
  6. Ahh ok. Briefly glancing at his code though, there are some things he could optimize For example, calculating and storing the Sin() and Cos() values for pitch yaw and only roll once every frame, instead of every time a point is drawn.
  7. Is the bottleneck the fact that an arduino cant really drive an LCD or is it your 3D drawing code?
  8. Ohh, i thought you had finished building the your panel Sputnix, sorry " They have a separate analogue pot to set the "intensity" of movement, but it's still a digital on/off.", soo... like push buttons but in joystick format?
  9. @Sputnix how well do your PS2 joysticks work? Any issues with floating or anything? Can you gravity turn your crafts without control issues?
  10. Started designing my panel I am debating whether the prograde / retrograde etc buttons also double back to set to activate action groups (since there are ten sas modes and ten action groups).
  11. Edit: the orignal version of this post had a question that i figured out I added navball speed modes. They use the upper nibble of SASMode (autopilot vector). "If the navball is in Surface mode and SAS is set to AntiNormal, SASMode will equal TARGET + SMAntinormal = 48 + 5 = 52. ". To get the SASMode (auto pilot vector) on arduino, do (SASMode & 0x0F), and (SASMode & 0xF0) to get the navball speed mode. Navball speed mode definitions: #define ORBIT 16 #define SURFACE 32 #define TARGET 48 Heres some example code for arduino: if((VData.SASMode & 0x0F) == SMRetroGrade){ //if the SAS is set to RetroGrade... CPacket.SASMode = SMPrograde; //set to Prograde }else{ CPacket.SASMode = 0; //reset } if((VData.SASMode & 0xF0) == ORBIT){ //If navball in orbit mode... CPacket.SASMode = CPacket.SASMode | TARGET; //Set to target mode. (Notice the bitwise-or with the SAS autopilot vector }
  12. @mountaineerman awesome build Would really love to see an closer overhead view of the panel. *c4ooo is jealous of your wire organizing skills >_> It would be better though, if you posted pics of your project here:
  13. Welp, it crashed my laptop when i tried to load it :/ In the end i had to pull the plug becouse everything simply froze.
  14. Hmm, looking at https://github.com/zitron-git/KSPSerialIO/blob/master/KSPSerialIO/KSPIO.cs#L935 it seems that SASMode remain set to the last value, and wont reset to zero when SAS is dissabled. Similarly, by looking at https://github.com/zitron-git/KSPSerialIO/blob/master/KSPSerialIO/KSPIO.cs#L1114 , setting CPacket.SASMode = SMOFF; wont actualy dissable SAS, but would be ingored. (In my orignal code, setting the SAS control byte to zero would not change anything, but the sas state sent to the arduino would revert to zero when SAS is turned off) Just wanted to point this out, as i think it may cause problems.
  15. I was imageing 1 master switch and 10 push buttons to control SAS, buy 10 lever switches would work too.
  16. I've tried loading it, but it sais "Incompatible with this version of KSP" (I am in 1.2.0) But I only have like 4GB RAM on my computer, so that may be the problem x.x
  17. Heh, i know this situation all too well from my experience programming graphing calculators >.< Never really bothered to check the amount of ram on an arduino though More on topic though, could anyone suggest some joysticks? I am looking for two 1-axis and two 2-axis joysticks. (One pair for rotations and the other translation) I have done some searching, and i haven't found any 1 axis joysticks at all.
  18. Can you please merge the Pull Request? In the future would like to add navball mode (Surface / Orbit / Target) and possibly time warp, if you dont mind
  19. Do you guys think the arduino should receive what autopilot modes are available? Edit: setting / receiving SAS stuff works now Edit 2: Pull request (hopefully) created [And hopefully works ]
  20. As far as i understand, ActiveVessal should be the same as FlightGlobals.ActiveVessel (This isn't my code that i am modifying). Anyways, i guess it doesn't like that i am casting a number to (VesselAutopilot.AutopilotMode) or something, becouse i can change the mode fine with "ActiveVessel.Autopilot.SetMode(VesselAutopilot.AutopilotMode.RadialOut);" etc. Edit: "ActiveVessel.Autopilot.SetMode((VesselAutopilot.AutopilotMode) ((int) SOME_BYTE));" works but "ActiveVessel.Autopilot.SetMode((VesselAutopilot.AutopilotMode) (SOME_BYTE));"? Can someone confirm that this and that its not just some other part in my code that was messing stuff up?
  21. Yes, i have made sure that i am actually able to change the SAS mode (i set it manually). Anyways, maybe its because i am doing ActiveVessel.Autopilot.SetMode((VesselAutopilot.AutopilotMode) BYTE_REPRESENTING_MODE); Instead of something like: switch(BYTE_REPRESENTING_MODE){ case 0: ActiveVessel.Autopilot.SetMode(VesselAutopilot.AutopilotMode.StabilityAssist); break; case 1: ActiveVessel.Autopilot.SetMode(VesselAutopilot.AutopilotMode.ProGrade); break; case 2: ActiveVessel.Autopilot.SetMode(VesselAutopilot.AutopilotMode.RetroGrade); break; etc... } (Never done C# until yesterday) Once i get back to my code in ~6 hours i will update the post
  22. I am trying to set the SAS autopilot mode programatically, i am calling: ActiveVessel.Autopilot.SetMode((VesselAutopilot.AutopilotMode) Mode ); However this does not change the mode. I have looked at the kOS code, and it's also changing the mode with Autopilot.SetMode(); Could anyone shed some light on this? I have tried adding the following: (From https://github.com/Mihara/RasterPropMonitor/blob/6d322ad430d6496450c5415e5d57f44f13a7b86f/RasterPropMonitor/Handlers/JSIInternalRPMButtons.cs#L220 ) UIStateToggleButton[] SASbtns = UnityEngine.Object.FindObjectOfType<VesselAutopilotUI>().modeButtons; SASbtns.ElementAt<UIStateToggleButton>((int)KSPSerialPort.VControls.AutoPilotData).SetState(true); Didn't help.
×
×
  • Create New...