Jump to content

Recommended Posts

Posted

Has anyone been successful getting the rotary encoders working using OpenCockpits cards and DCS?

 

For example the Abris Cursor and Abris Brightness knobs?

 

If so, I'd really appreciate some instructions on the Lua and Sioc... :helpsmilie:

 

Thanks!

Posted

I'm interested in the same question, but for the A-10C.

I only respond to that little mechanical voice that says "Terrain! Terrain! Pull Up! Pull Up!"

 

Who can say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow.

-Robert Goddard

 

"A hybrid. A car for enthusiasts of armpit hair and brown rice." -Jeremy Clarkson

 

"I swear by my pretty floral bonet, I will end you." -Mal from Firefly

Posted

oops, never had the pleasure to use OpenCockpits boards, but I'm having problem with my own solution as well. Hopefully someone with the right experience will show up later.

Posted

sorry can't answer the original question, but wanted to let anyone know who may be interested - I will have a complete solution available in the near future for those who want to use Arduino for their pit. Switches, buttons, rotaries, encoders, servos, steppers, 7-segs / LEDs... all of them will be implemented. I'll start a thread here when I'm ready to post the download.

Posted
oops, never had the pleasure to use OpenCockpits boards, but I'm having problem with my own solution as well. Hopefully someone with the right experience will show up later.

 

Well I've got these incremental encoders working fine with the prototype of what I'm grandiosly calling my universal switch interface card.

 

They say these things can read backwards if you turn them fast enough. So the next step is to test one with an electric drill :-)

 

Gray code encoders are also working great. I really like these, even though they take 4 pins.

 

Cheers,

Colin

Posted
Well I've got these incremental encoders working fine with the prototype of what I'm grandiosly calling my universal switch interface card.

 

They say these things can read backwards if you turn them fast enough. So the next step is to test one with an electric drill :-)

 

Gray code encoders are also working great. I really like these, even though they take 4 pins.

 

Cheers,

Colin

 

Well, it doesn't necessarily take an electric drill to make that point, but it could be fun to demonstrate how reliable your system is in this way.

 

Basically if you're pooling the pulses from the encoder outputs with a regular routine, it all depends on how frequently you poll it in your s/w. If you turn the encoder fast enough so that more than one states make their way into the time slot of one polling interval, your program will miss some pulses and generate false results.

 

And if your program interrupts on edges, you're likely to get better response out of those encoders. But there are still chances that the encoder spins fast enough and overlapps the same interrupt causing problems.

 

I guess you already knew most of what I said, but it's difficult to calculate how long the maximum time is which takes the program to run between two polling routines. Personally, as long as it doesn't go haywire when I spin it as hard as I can, I can live with it. :)

 

 

Regards,

Alex

Posted
Has anyone been successful getting the rotary encoders working using OpenCockpits cards and DCS?

 

For example the Abris Cursor and Abris Brightness knobs?

 

If so, I'd really appreciate some instructions on the Lua and Sioc... :helpsmilie:

 

Thanks!

You can use a potentiometer for the brightness knob of the Shkval and Abris with opencockpits usb card. I modified a bit oakes lua export code and the Shkval pot seem to work fine. I will finish my Shkval panel this week, re-test the code and I will post my little modification.

Posted
You can use a potentiometer for the brightness knob of the Shkval and Abris with opencockpits usb card. I modified a bit oakes lua export code and the Shkval pot seem to work fine. I will finish my Shkval panel this week, re-test the code and I will post my little modification.

 

That would be great to get the details on this... sounds promising.

  • 8 months later...
Posted
So anybody managed to move Abris cursos with a gray encoder in open cockpits??

You don't want to use a gray code encoder for the cursor; you want to use a 2-bit incremental encoder.

Cheers,

Colin

Posted

I have the solution for use a Gray Encoder direct to Master Card for control Abris cursor.

 

In ExportSupport:

 

-- Calls non-clickable commands without parameters for two-position switch

function TwoPositionSwitch_NCC_noparam(pValue, pDevice, pCommandNumber)

GetDevice(pDevice):SetCommand(pCommandNumber, pValue)

end

 

In SiocConfig:

 

[1] = {TwoPositionSwitch_NCC_noparam, 9, 501}, -- Incrementar Abris

[2] = {TwoPositionSwitch_NCC_noparam, 9, 502}, -- Decrecer Abris

 

SIOC Code:

Var 0400, name CRSdcho Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2 // CRS Derecho

{

IF &CRSdcho > 0

{

&ABRIS_DEC = 1

&ABRIS_DEC = 0

}

ELSE

{

IF &CRSdcho < 0

{

&ABRIS_INC = 1

&ABRIS_INC = 0

}

}

}

 

Var 1, name ABRIS_INC, Link IOCP, Offset 501, Value 0 // Abris Increase

Var 2, name ABRIS_DEC, Link IOCP, Offset 502, Value 0 // Abris Decrease

 

 

Thanks to Oakes and others in this forum for posting all their progress always.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...