Jump to content

Jocman

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by Jocman

  1. Hi Oakes. It's always fine to hear from you. No problem, I understand you and sincerely I wish you all the best. As I told, I packaged everything, so I'll take a pause. And, as I can't work on OC, I'm back to design some solution for the "hardware", meaning the cockpit structure. Briefly: build the structure to host all the panels (the panels are ready, but need it to wire all the cables to OC), the material (alu or pvc profilates ???), build the controls (cyclic and collective) with several technical solutions, but overall: WHERE THE HELL PUT MY COCKPIT?????? :megalol: I hurry to back home and start working again. Colin, thanks. I survived 7 months and some "several afghan surprises". I really hope nothing will happen also the last 8 days. Jocman
  2. Hi Colin. Thank you for the suggestion. I'll try to do it as soon as possible. Yesterday I packaged all my military equipment and my "free time" stuff, as in 8 days I'll back in Italy. Finally my time in Afghanistan is over. (7 months.....) BTW, soon I'll back to work on my BS cockpit (I've to finish it, it's since jan 2010 I'm working on it....). Keep in touch guys. Jocman
  3. Hi Colin. Well, actually, I'm using an encoder to drive the Baro Alt. I also set the resolution to 0.001 (so less than 0.005). The problem is that now the Baro Alt keep jumping to 60 mbar (but why????:mad:), then I can adjust the value only for 1 unit (from 60 to 61 mbar), but with increments of 0.001. When the flag goes on 61, it stops....I can only decrease to 60..... Alle the other encoders work fine, but this freackin' one........ Jocman
  4. Hi Feed. Well, it was only a joke I told (the monologue). :thumbup: I realize everytime that many people read my posts (curiosity or interest, it doesn't matter) and I'm happy for that. About programming, I'm sorry to let you down, but my programming skill is very close to 0, as all the work I did til now has been done due to the outstanding support of Oakes and y2kiah so as other guys(and I'll report it at the end of this journey, even if I don't remember all the names). This is the reason why I always hope to some help more. Of course, I know that sometime I just need to try and experiment, but as the programming language aren't my food, any help and suggestion is always welcome. Anyway, as soon I'll complete my cockpit, for sure I'll share all my "experiences" and results with the community. Jocman PS: BTW, some trouble listed 5 posts ago (#143) still exist.... :music_whistling:
  5. Guys, I feel like I'm having a monologue :megalol: Anyway, after the outputs, I started with the encoders (ABRIS shunt, Latitude, Magnetic dev, HSI 1&2, ADI, Radar alt - I don't think I'm missing other encoders). All of them work fine (some details to fix for the "resolution", but I'll do it "on field" running the sim). The Baro Alt give me some problem: rotating the virtual encoder everything is fine (of course), but rotating the "real" one, it jump to 60mbar, then switchs only 1 step up and 1 down, no more, no matter how many steps I turn up or down. Suggestion? Radio Frequency encoder: Clickabledate set them as TUMB, but there's an inactive LEV set; I switched the TUMB as inactive and the LEV as active, then programmed the encoder, but they don't work at all. Any suggestion? It can be done? For the rest of the knobs, I think I'll make it as pots, but here I don't have so I've to wait to back home to get them and do it Jocman
  6. Update: The problems with the OC outs have been fixed. After several tests, I realized that the flat cable I've been using was faulty. With a new one, everything works fine, so I programmed all the outputs I need, and they work fine. In the next days I'll work on the rest of the inputs (encoders and few others) which still give me some problems, hoping to fix these problems too. Jocman
  7. Hi guys. After a short relax pause in Dubai (the only commnent I can do about it is: WOW.......), I'm back to my cockpit project. As my questions in the previous post are still waiting for some help, I decided to start with the outputs. By checking some examples files of some of you guys, I understood that to program an output, I just need to know its ID (from Mainpanel_init.lua). Then I started with the first test. I decided to try with the Datalink's button LED "1" (ID = 17). In configSioc.lua I put the line: [1000] = {0, 17} Well, honestly I really don't know if it works, but I've seen that some of you just programmed the outputs this way.... but why put the first value as 0? this value doesn't exist in device.lua, but it exists a devices["DBG_OUTPUT"] = 1, anyway I tried also by putting 1 instead of 0, but no changes in BS (see later down - I've some hardware problems). In SIOC I put the line: Var 1000, Link IOCARD_OUT, Output 11 When I run the sim, it doesn't work: in BS the "1" led is on or off but "outside" nothing. Even because I have an hardware problem: When I run SIOC (before run BS), the led switches automatically on....I don't know why. I'm currently dealing with OC about it, and they also say this is strange, because normally the leds should be off until I give the ON command. Anyway, the procedure I use to program the outputs is right? And.....any help concerning my previous post?? :cry::cry: Jocman
  8. Hi all. I almost finished with programming the inputs. I miss just some switches and all the encoders, but there are some problems, so if someone can help me (I strongly hope in Oakes' support) it will be great. VHF 1 AND 2 SWITCHES (SYSTEM PANEL): They are linked to the following strings: elements["COMM-PWR-UKV-1-PTR"]= {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("VHF-1 (R828) power switch"), device = devices.R_828, action = {device_commands.Button_5,device_commands.Button_5}, arg = {285,285}, arg_value = {-direction*1.0,direction*1.0}, arg_lim = {{0, 1},{0, 1}}, use_OBB = true, updatable = true} and elements["COMM-PWR-UKV-2-PTR"]= {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("VHF-2 (R-800) power switch"), device = devices.R_800, action = {device_commands.Button_11,device_commands.Button_11}, arg = {286,286}, arg_value = {-direction*1.0,direction*1.0}, arg_lim = {{0, 1},{0, 1}}, use_OBB = true, updatable = true} Actually they don't work at all: clicking the cockpit of course they works, but using OC no way to make them work. ENCODER: first I programmed the ABRIS Cursor, and it works fine; then I tried to program the ABRIS Brightness, but no sign of life; same story for HUD Brightness or NAV Brightness. I didn't change anything in the program lines, but the Device and Switch ID. So I suppose I can have similar problems with the other encoders; as the LEV lines' instructions are different concerning arg, arg_value, arg_limit, gain and other vars, my problem could be linked to this issue? If so, there's some way to fix it? RADIO FREQUENCY KNOBS: In clickabledata.lua, if I'm not wrong the commands are considered as switches (TUMB class), and there's also a LEV class (but deactivated). As I planned to use 2 concentric encoders to set the radio frequency, I think I've to activate the LEV class lines and deactivate the TUMB class lines, is it? MISSING LINES IN CLICKABLEDATA.LUA I realized there's at least a missing lines concerning the STBY SAI-ON switch (System panel, next to anti collision beacon's switch). So no way to program it. Suggestions? EJECTION SEAT SYSTEM: Can you have a look to my previous post (http://forums.eagle.ru/showpost.php?p=1050191&postcount=116), where I reported the lua code I used to drive the 3 Ejection switches? the problem still exists..... POTENTIOMETER SUPPORT Someone (I'm sorry, I forgot the name) submitted a code to set potentiomenters in lua, to use instead of encoders (HUD brightness, Volumes, etc). As it is a very good stuff, I woukld like to use it, but the question is: what kind of pots need to be used??? Thanks a lot to everyone Jocman
  9. I've the same opinion, so I'll check out for some other rotaries with 2 separate grounds (I've seen them online). But I think I'll do it in a couple of months: my holidays are going to finish, so in a couple of days I'll back to Afghan paradise, hopefully to back home definitivey at the end of february. Well, at least I've something to do during the "exciting" afghan evenings... Jocman
  10. Hi Oakes. Well, what to say??? It works great!!!!! Just a question: why it needs to change the value (+-)? it wouldn't be enough just to swap fisically the 2 pins of the encoder on the OC card? Anyway, I keep going on with the work. I just tought to set the encoder on separate master cards just to drive them, so by now I'll just keep programming the switches, leaving all the encoders at the end of all. I'm having some problem only with the rotary switches with more than 9 positions: as OC cards can drive devices only grouped by 9 pins (and all my rotaries are 12 pos with 1 ground), i should use two different group of pins (9 + x); I suppose I must use rotary switches with 2 ground pins, right? I don't think it could be a good idea to weld the same ground pin to 2 different input groups, right? Jocman
  11. Hi Oakes. I'll try to test your code tomorrow (from 4th to 7th I'll be out with my soulmate), as today I spent several hours programming OC Cards (I'm getting crazy: it's a huge challenge to find all the right commands in clickabledata.lua). Anyway, just having a quick look to your code, I'm wrong or it means I must choose in which direction turn the encoder? meanings that using this choice: [20] = {Encoder, 30, 1, 0.018}, or Code: [20] = {Encoder, 30, 1, -0.018}, I can only rotate in one direction? I.e., I will only increase or decrease the values with the encoder (depending on + or -), but not both? It should mean that I'll need to complete the full values cycle in case I need to go back with the values..... Or I'm wrong? This is only my first impression, as I didn't test it again, but I find strange to put 2 vars with the same value (in this case [20]) but with 2 different strings..... Jocman
  12. UPDATE: Well, I tried with the ABRIS right knob. Once again, even if I rotate my encoder both the ways, in BS it rotates only CW. And the values are read by BS only in this way. I checked once again the log file, but no changes, SIOC works fine. Jocman
  13. Hi all, and Happy New Year. Well, Oakes, I tried what you suggested, and this i the log I got: ---Log: Start----- Encoder debug. SIOC Value(pValue) =0 Calculated value = 0 Encoder debug. SIOC Value(pValue) =1 Calculated value = 0.003 Encoder debug. SIOC Value(pValue) =2 Calculated value = 0.006 Encoder debug. SIOC Value(pValue) =3 Calculated value = 0.008 Encoder debug. SIOC Value(pValue) =2 Calculated value = 0.006 Encoder debug. SIOC Value(pValue) =1 Calculated value = 0.003 Encoder debug. SIOC Value(pValue) =0 Calculated value = 0 Encoder debug. SIOC Value(pValue) =359 Calculated value = 1 Encoder debug. SIOC Value(pValue) =358 Calculated value = 0.997 Encoder debug. SIOC Value(pValue) =357 Calculated value = 0.994 Encoder debug. SIOC Value(pValue) =358 Calculated value = 0.997 Encoder debug. SIOC Value(pValue) =359 Calculated value = 1 Encoder debug. SIOC Value(pValue) =0 Calculated value = 0 It seems everything works fine (honestly I didn't make any change to my code, just the modify for the log you suggested me). Values run between 0 and 1, in both ways (CW and CCW), so if I'm not wrong BS gets the correct value. I realized anyway that the simulated knob doesn't follow the encoder rotation; now, I don't care very much about this "graphical" issue, as the goal of a "real" cockpit is to not look the "simulated" one. This means that if the simulated knob has is own animations not matching my encoder movement, but the BS software reads the encoder values in the right way, I don't care very much, as I'll never see the simulated knob. What do you think about? Anyway, maybe I'll make some test with the ABRIS encoder, so to check, i.e., if proramming the ABRIS the values sent to BS will really match the real movement (well, I hope to see some "numbers" in the ABRIS changing according my rotation). Jocman
  14. Hi oakes. Currently i'm travelling home for some holidays.as soon i'll be at home i'll try your suggestion,hopefully in a couple of days. Jocman
  15. Well guys, renewing my wishes for Christmas, here comes a picture of my room in Afghanistan: my BPV, my rifle, my laptop obviously with BS, and on the desk the OC cards. Merry Christmas Jocman
  16. Yes I confirm. here's the SIOC: Var 0067, Link IOCARD_ENCODER, Input 0, Aceleration 2, Type 2 // Head riferimento { L0 = V0067 // * -1 turning clockwise should be plus V0068 = ROTATE 0 ,359 ,L0 } Var 0068 // heading (0 .. 359) Testing in SIOC, it works fine: rotating in one direction, it increases the value, in the opposite direction decreases, in a range 0-359 Looking at the clickabledata.lua (looing for an encoder to test), I'm wrong, or there are not all the cockpit switches / knobs / etc? I was especially interesting in the radio knobs, as I would like to set 2 concentric encoder to use it. But I didn't find them. Btw, I wish all of you a Merry Christmas, and especially to you Oakes, as with your patience and willingness are giving to me the possibility to make such a dream come true. Thank you. Jocman
  17. Hi Oakes. I gave a try to your code, and it works.... Well......not completely..... In fact, I tried with the HSI knob. [68] = {Encoder, 30, 1, 1, 359} It works, but only one way. I thougt to build a var like for the x position switch, but in SIOC the encoder doesn't work with IF...THEN condition. In SIOC the encoder works fine both directions, but in LUA it doesn't work. Jocman
  18. Well, mate, thank you for the hint about the inputs (in 4 days i'll be at home, and i'll try with 4 masters connected). Today I tried once again with only 1 master on J1, starting a new .ssi file, just to check how the encoders works. Well, it's nice, they work very fine, at least using SIOC for the test. The problem now is to let LUA to understand the meaning of the rotation... In SIOC, following the tutorial, I set an encoder setting a limit between 0 and 359 degrees (simulating an heading selector). Having a look to clickabledata.lua, I found (i.e.) the HSI command heading selector. I think the solution should be in the values: arg_value = {0.001}, arg_lim = {{0, 1}} wich means (I hope) that the command has a range between 0 - 1 with increments of 3 decimals. Considering the code you wrote for the rotary switches, it should mean that by rotating the knob I can choose a value between 0 and 999, and maybe in SIOC I can limit this value between 0 and 359 (?) How many bulls..t did I write???? Jocman
  19. Well, mate, I tried already with the code you suggest, but it doesn't work. Changing the first number means that I'm using another USB exp. The only way to tell SIOC I'm using more master on the same USB exp is to change the 3rd number. But it doesn't work again. At least not in the way I'm working (using only 1 USB exp + 1 master). I just suppose that I MUST connect physically the master cards in the right order (J1,J2,J3,J4) otherwhise it wouldn't work. I cannot do it right now, but in the next week I'll back home for some holydays, hoping to get 3 master cards more, So I'll try with all the cards, hooping to not have any problem with the inputs' number (as they restart each for master). I asked also directly OC, but I got such a non-sense answer (like: "what time is it'" and they told me "today is raining".....). Or my english is really a sh..t, or I don't know..... Up to back home, I'll try maybe to program another SSI file only to check how the encoders work, or to thest some output. But If you wanna keep working together, let me know. Jocman
  20. Hi Mate. Of course, it will be a pleasure to cooperate. About the rotary encoder, as is the first I encountered on my way (I started programming the panels from the right side) I was thinking to start with the NAV Brightness: elements["PVI-BRIGHTNESS-PTR"] = {class = {class_type.LEV}, hint = LOCALIZE("NAV Brightness"), device = devices.PVI, action = {device_commands.Button_29}, arg = {327}, arg_value = {0.001}, arg_lim = {{0.0, 1.0}}, gain = {0.1}, use_OBB = false} Well, probably in the real Ka50 I think is a pot, but in the sim I think it works as a rotary encoder. If to you is fine, we can try with this.ù Actually I didn't connect an encoder to the card, so never tried in SIOC. To be honest, I'm having some...problem with the cards: I finished all the inputs (72) on the first master, so I would like to start with the 2nd master. But I can't figure out how to set the SIOC.ini with more masters. The command master=0,4,1,20 means that I'm using 1 device (0), this device is an USB exp (4), with 1 master connected (1) un the USB ID 20. This is correct? if is so, why if I put: master=0,4,4,20 and I connect a 2nd master on J3 (I can't right now connect to J2 - I don't have the cable, and more here in Kabul I've only 1 USB exp + 1 master), nothing works anymore? (LED on USB exp always on, if I check with controlador I get a lot of input working at the same time, etc etc). I programmed a variable [85] to link to the new master input, I numbered this input once again as "1" (is the 1st input of the second master), but doesn't work..... Jocman
  21. First X-positions rotary switch programmed (PVI's Nav Master Switch): it works great. Always gratefull to Oakes for his outstanding job. Someway I fixed the problems concerning the "fake" BTNs on right panel: just created a "ghost" var to match to each "suspected" input, then tested in BS until find it in the cockpit. Concerning my problem with the Ejection System 3 + cover switches: any suggestion? And (this is to Oakes): any news about the rotary encoder script? Jocman
  22. Hi guys. I'm going on with the programming of SIOC. Currently I'm working on the right side panel (electric, fuel, etc...) having the following trouble: - VHF1 and VHF2: I'm using the following code: [23] = {TwoPositionSwitch, 49, 5, 1}, [24] = {TwoPositionSwitch, 48, 11, 1}, But the 2 switches don't work; I double checked the parameters, but nothing to do. - EJECT SEAT SYS: I would like to use just 1 input (2 pos switch) to make the cover flip on, then all 3 switches ON. By following the suggestion of y2kiah, I wrote in ExportSupport.lua the following code: function TwoPositionEjectionSystem(pValue, pDevice, pNumber1, pNumber2, pNumber3, pCover, pOnValue, pInvert) if pInvert then if pValue == 1 then pValue = 0 else pValue = 1 end end local dev = GetDevice(pDevice) if pValue == 1 then -- Flip on then switch 3 switches on dev:performClickableAction(pCover + 3000, pValue * pOnValue) dev:performClickableAction(pNumber1 + 3000, pValue * pOnValue) dev:performClickableAction(pNumber2 + 3000, pValue * pOnValue) dev:performClickableAction(pNumber3 + 3000, pValue * pOnValue) else -- Switch 3 switches off then flip off dev:performClickableAction(pNumber3 + 3000, pValue * pOnValue) dev:performClickableAction(pNumber2 + 3000, pValue * pOnValue) dev:performClickableAction(pNumber1 + 3000, pValue * pOnValue) dev:performClickableAction(pCover + 3000, pValue * pOnValue) end end then in SIOC.lua: [28] = {TwoPositionEjectionSystem, 6, 1, 2, 3, 4, 1} When I test it, I got something like: switch on: flip on, turn the swithches on then flip off if I switch off the on again, i get the cover flip on then the switches on (but I expect the get this result the first time, not the second). then trying again and again i get the with the switch off, the cover and the 3 switches are on...... What's wrong? Last question: while analyzing the clickabledata.lua, i've seen (alway concerning the right side panel) the following code: elements["CONTROL-OIL-PTR"] = {class = {class_type.BTN}, hint = LOCALIZE("Fuel quantity indicator self test button"), device = devices.FUELSYS_INTERFACE, action = {device_commands.Button_14}, stop_action = {device_commands.Button_14}, arg = {616}, arg_value = {1.0}, arg_lim = {{0, 1}}, use_release_message = {true}} It should be a push button. But there's no such a push button in the panel, at least with this function.... and is not the only one (check also line 81 and 104). Where are those push buttons??? Thanks Jocman
  23. Hi Oakes. Thanks for your explanation. Well, I talk about 10 and 11 because in Clickabledata.lua I found: elements["CONVERTER-PTR"] = {class = {class_type.TUMB, class_type.TUMB}, hint = LOCALIZE("DC/AC inverter"), device = devices.ELEC_INTERFACE, action = {device_commands.Button_10, device_commands.Button_11}, arg = {270, 270}, arg_value = {-direction*0.1, direction*0.1}, arg_lim = {{0.0, 0.2}, {0.0, 0.2}}, use_OBB = true, updatable = true} So, it reports 2 device_commands.button value BTW, I tried again but it doesn't work. So, I tried a lucky shot: I changed the reference var value to 2, for this reason: if the switch is 1-2-3, it means that the middle position will be 2. Now, I don't know if this was a right tough, but now it works fine.... But if it is right, how to think concerning a x position switch (linear or rotary)? There will be no "middle position", so wich value put there? Jocman
  24. I’m trying to program a 3 pos switch, following Oakes’s hints.He says to use the SimpleRotary function, treating a 3 pos switch like a rotary, then suggest to have a look to the following SIOC code Var 0506, name BurstLenShort, Link IOCARD_SW, Input 8 { IF &BurstLenShort = 1 { &BurstLen = 1 } IF &BurstLenShort = 0 { &BurstLen = 2 } } Var 0507, name BurstLenLong, Link IOCARD_SW, Input 6 { IF &BurstLenLong = 1 { &BurstLen = 3 } IF &BurstLenLong = 0 { &BurstLen = 2 } } Var 0510, name BurstLen, Value 1 I adapted the code to the switch I’m going to set (is the Inv Auto Man switch in the electric panel). This is the code I wrote: Var 0010, name InvAuto1, Link IOCARD_SW, Input 6 // Electric System { IF &InvAuto1 = 1 { &InvAuto = 1 } IF &InvAuto1 = 0 { &InvAuto = 2 } } Var 0011, name InvAuto2, Link IOCARD_SW, Input 7 // Electric System { IF &InvAuto2 = 1 { &InvAuto = 3 } IF &InvAuto2 = 0 { &InvAuto = 2 } } Var 0012, name InvAuto, Value 0 (I put 0, as I think the default position should be in the middle, otherwise how to choose this value????) This is how I think it works: it use a reference var (in this case 12), to change its value (1-2-3); this (1-2 or 3), as I understood, is the value sent to export.lua. This is true? But now, how the set sioc.lua??? I wrote this code in sioc.lua [10] = {SimpleRotary, 2, 10}, [11] = {SimpleRotary, 2, 11} But of course, it doesn’t work…. I think I shoul refer to var 12, but i don't think I can write something like: [12] = {SimpleRotary, 2, 10}, [12] = {SimpleRotary, 2, 11} repeating the [12] twice.... This is another big obstacle to pass, as if it will be so difficult to program a 3 pos switch, I can’t imagine what about a x pos rotary switch (to not talk about the rotary encoders….). Someone could explane in an easy way the phylosophy of this function? (I'm a sunday's coder......) Jocman
  25. IT WORKS!!!! Great help, y2kiah! Thanks a lot!! Scudslaker, I got the cards "ready to plug". Anyway, this morning our logistic section reported about a failure in the power line (maybe less voltage...) yesterday; today the power line is fine again. So I decided to test again the cards: they work perfectly. I'm just wondering: I'm using a laptop, with its own battery pack, connected to the power line. even if the power line has a failure, the battery doesn't provide a linear power???? Anyway, the important thing is that I can keep wotking on BS. Thanks all!!! Jocman
×
×
  • Create New...