PanelBuilder Posted June 17, 2009 Share Posted June 17, 2009 Hey! My Weapon Status and Control panel is finally up and running. Switches are all good, including the automatic switch alignment at mission start. 7-seg dispalays are good -- actually a little too good: the Selected Weapon and Selected Remaining indicators don't always blank when they do in the sim, like when the cannon is selected. Anybody know how to tell in lua if the cannon is selected? I'll post some pics if I can firgure out where I hid my camera. Maybe a little movie would be a good idea. You can see the Selected Remaining indicator count down real fast when you jettison Vikhrs. BTW in case anyone was wondering, the cannon rounds remaining display in the sim truncates, doesn't round. :-) Cheers, Colin Link to comment Share on other sites More sharing options...
JG14_Smil Posted June 17, 2009 Share Posted June 17, 2009 very good news :) Link to comment Share on other sites More sharing options...
Swetrekki Posted June 17, 2009 Share Posted June 17, 2009 it killed the cat apparently but i'm very curious about the "automatic switch alignment" pic or video, why choose, we want it all :) Link to comment Share on other sites More sharing options...
-Bazong- Posted June 17, 2009 Share Posted June 17, 2009 Sweet!! Looking forward to pics and/or video :) Link to comment Share on other sites More sharing options...
HitchHikingFlatlander Posted June 17, 2009 Share Posted June 17, 2009 Yeah what they said looking forward to seeing you build dude and congrats! Always cool to build this stuff and see it work! http://dcs-mercenaries.com/ USA Squad Link to comment Share on other sites More sharing options...
PanelBuilder Posted June 21, 2009 Author Share Posted June 21, 2009 it killed the cat apparently but i'm very curious about the "automatic switch alignment" Sorry, here's what I meant by automatic switch alignment: at mission start lua sends a command to the WSC board that says "send me all your switch positions". When it gets them, lua compares them to the known startup switch positions in the sim and makes any adjustments required. For the WSC switches, I think the startup positions are the same for all mission types. For other panels though, positions can vary depending on whether it's a cold start, a warm start, or a hot start (already in the air) so that has to be determined. On the other hand, the WSC displays should not light up on a cold start. And that's what I'm working on today, determining if it's a cold start or not. Cheers, Colin Link to comment Share on other sites More sharing options...
Swetrekki Posted June 21, 2009 Share Posted June 21, 2009 Sorry, here's what I meant by automatic switch alignment: at mission start lua sends a command to the WSC board that says "send me all your switch positions". When it gets them, lua compares them to the known startup switch positions in the sim and makes any adjustments required. Nice, really smart as well. even if they aren't in the correct pos. for start up, they will at least correspond with the screen, i like it, i like it a lot actually. (and it didn't kill me either ) Link to comment Share on other sites More sharing options...
JG14_Smil Posted June 21, 2009 Share Posted June 21, 2009 so, if you are flying when mission starts and switches are off, BS will turn them off and you fall out of sky? You still have to manually set switches to the sim beforehand, no? Link to comment Share on other sites More sharing options...
PanelBuilder Posted June 22, 2009 Author Share Posted June 22, 2009 so, if you are flying when mission starts and switches are off, BS will turn them off and you fall out of sky? You still have to manually set switches to the sim beforehand, no? When you press pause/break to start the mission the sim changes all its switches to match the physical switches. The other option is to not send the board the "send all" command. Then the sim only gets switch positions when one changes. So, if say Master Arm was off in the sim and on on the panel, then to turn it on in the sim you would turn it off on the panel (which the sim ignores since its already off) and then turn it on. I like the first way better but there is some risk if your'e going to start in the air. Cheers, Colin Link to comment Share on other sites More sharing options...
PanelBuilder Posted June 22, 2009 Author Share Posted June 22, 2009 Nice, really smart as well. even if they aren't in the correct pos. for start up, they will at least correspond with the screen, i like it, i like it a lot actually. (and it didn't kill me either ) Thank you, thank you. The displays are cool too. Depending on where in lua you put the send commands, the displays can light up to match the sim panel *before* you hit pause/break. Link to comment Share on other sites More sharing options...
JG14_Smil Posted July 12, 2009 Share Posted July 12, 2009 don't leave us hanging! :) Link to comment Share on other sites More sharing options...
Alex_rcpilot Posted July 12, 2009 Share Posted July 12, 2009 Once the startup status is obtained, are you using built-in firmware algorithm in your microcontroller to "synchronize" the panel indicators with the game? I guess that's what happens without ED's pit interface. I'm expecting this kit too. Link to comment Share on other sites More sharing options...
Swetrekki Posted July 12, 2009 Share Posted July 12, 2009 (chanting) PICS PICS PICS PICS PICS PICS VIDEO VIDEO VIDEO PICS PICS PICS (repeat) Link to comment Share on other sites More sharing options...
Oakes Posted September 23, 2009 Share Posted September 23, 2009 Hey! My Weapon Status and Control panel is finally up and running. Switches are all good, including the automatic switch alignment at mission start. 7-seg dispalays are good -- actually a little too good: the Selected Weapon and Selected Remaining indicators don't always blank when they do in the sim, like when the cannon is selected. Anybody know how to tell in lua if the cannon is selected? I'll post some pics if I can firgure out where I hid my camera. Maybe a little movie would be a good idea. You can see the Selected Remaining indicator count down real fast when you jettison Vikhrs. BTW in case anyone was wondering, the cannon rounds remaining display in the sim truncates, doesn't round. :-) Cheers, Colin Hi Colin Did you find a solution for this problem.....because now I have the same problem:)... /Oakes Link to comment Share on other sites More sharing options...
PanelBuilder Posted September 23, 2009 Author Share Posted September 23, 2009 local gun = MainPanel:get_argument_value(615) Cheers, Colin Link to comment Share on other sites More sharing options...
Oakes Posted September 25, 2009 Share Posted September 25, 2009 local gun = MainPanel:get_argument_value(615) Cheers, Colin Yep, thanks again Colin, gave me a little bit of a headache though..but now it's solved. Problem: MainPanel:get_argument_value(615) returns -1 if the gun is the Safe/Non-selected position. Returns 0 if the gun is armed / selected and returns 1 if the gun trigger is pressed. Funny thing though, if you press the trigger with the gun in the safe position the function still returns 1. So you can't say that as long as MainPanel:get_argument_value(615) == -1 show the weapon type/remain values, as soon as you press the gun trigger the values disappear since MainPanel:get_argument_value(615) now returns 1. Solution: Use a global variable that is set to "Armed" if MainPanel:get_argument_value(615) == 0 and to "Safe" if MainPanel:get_argument_value(615) == -1 => if you just press the trigger MainPanel:get_argument_value(615) goes more or less directly from -1 to 1 (without hitting 0) => the global variable is still "Safe". Then use this value to determine if the weapon type / remain number should show or not.... I guess that the real cyclic makes it impossible to press the gun trigger while in the safe/non-selected position....... /Oakes Link to comment Share on other sites More sharing options...
Recommended Posts