USB HID Joystick & PPM-In program

More
25 Apr 2013 03:55 #9183 by SadSack
Replied by SadSack on topic USB HID Joystick & PPM-In program
Would it be hard to connect GPIOA.10 to trainer port?
Other TX can't do both without hold switch on.
I personally wouldn't mind connecting it but not everyone wants to solder.

Please Log in or Create an account to join the conversation.

More
25 Apr 2013 04:18 - 25 Apr 2013 08:20 #9185 by hmjack2008
Replied by hmjack2008 on topic USB HID Joystick & PPM-In program
(1) the Walkera Cable

Attachment Walkera_cable.jpg not found




(2) my cable (my own ideas in this ppm-in program)
- Coach : select PPM protocol , PPM out-put (audio-left)
- Student : select PPM protocol ,
this program will get PPM in-put (audio-right) then out-put (audio-left).
- Monitor :
Use PC to capture the PPM out-put (audio-left) from Student.

Attachments:
Last edit: 25 Apr 2013 08:20 by hmjack2008.

Please Log in or Create an account to join the conversation.

More
25 Apr 2013 08:44 #9193 by hmjack2008
Replied by hmjack2008 on topic USB HID Joystick & PPM-In program
I found PhracturedBlue already "Initial menus for ppm-in" :
+    u8 num_ppmin;
+    u16 ppmin_centerpw;
+    u16 ppmin_deltapw;
+    u8 train_sw;
+    u8 ppm_map[MAX_PPM_CHANNELS];


It's let me think a proposal ... , but I am NOT yet to coding for the proposal .

Attachments:

Please Log in or Create an account to join the conversation.

More
25 Apr 2013 12:50 #9194 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
hmjack, I don't think you understood the issue I had.
On the devo8, GPIOA.9 is connected to the 'left' pin
GPIOA.10 is connected to the 'plug connect' pin (that is it is shorted to ground once thephono jack is inserted). Nothing is connected to the 'right' pin of the phono jack. thus without hacking the radio, it is not possible to use GPIOA.10

This may be different on other radios. I did not check any of the others, buton the Devo8 at least it doesn't seem possile to use GPIOA.10 today.

Please Log in or Create an account to join the conversation.

More
25 Apr 2013 12:52 #9195 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
And hmjack, your picture properly describes the code I already have (but have not yet released for lack of testing) for how the trainer mode will work. The 'FPV' mode will be simpler, instead introducing new inputs for the mixer.

Please Log in or Create an account to join the conversation.

More
25 Apr 2013 14:35 #9201 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
Also, after switching the code to work with GPIOA.9 (and yet again re-soldering my USB port which I accidentally ripped off the Tx again), I was able to configure a trainer switch and use my Devo8 as a master and my Devo10 as the slave.

There's still a bunch of work to get the code polished up, but I have the basic functionality working now.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
25 Apr 2013 14:52 #9202 by rbe2012
Replied by rbe2012 on topic USB HID Joystick & PPM-In program
Great, this is really useful. Too bad I can not help with those things...

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 01:48 #9214 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
I checked in the full support for PPM-In using both 'train' and 'fpv' (actually named 'input') mode.
I've done some testing with my Devo8 & 10 and things seem to work ok so far.,

Note that the 'Center PW' in 'PPM In' is not the same as the one in the PPM protocol.
the PPM In 'Center PW' is equivalent to the PPM-Out 'Center PW' + 'Notch PW'
So 'Center PW' will generally be 1500 in the PPM-In configuration

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 05:23 #9216 by vlad_vy
Replied by vlad_vy on topic USB HID Joystick & PPM-In program
So, how it works now? If enabled PPM out, what happened with PPM-In? Can you explain how it works in detail?

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 05:34 #9217 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
PPMIn will disable PPM-Out. You cannot use them together.

If trying to setup a 'master' trainer:
You need a standard mono or stereo 1/8" jack to tie the transmitters together.
The slave should be set to use 'PPM' protocol
The Master should have the proper protocol set and set 'PPM In' to 'train'
Then click on 'Train' and make sure that the PW values are set properly as well as setting a toggle switch.
You can choose to change the Master-Slave channel mapping as well. This works by taking the specified channel in the spin-box from the slave and applying it to the specified Master channel. Thus if you set:
Ch3 = <Ch5>
It means that Slave Ch5 will be attached to master Ch3

Now turn on the slave.
you can now toggle the specified switch and the Slave values will be passed to the radio on the Master.

You should be very careful using it. The code is very new, and probably has bugs.

If you lose a connection with the slave the channels will hold their last position until you flip the toggle back. I'm not sure that's the right way to do it though, so feedback would be appreciated on the whole thing.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 06:36 #9218 by vlad_vy
Replied by vlad_vy on topic USB HID Joystick & PPM-In program
Some FPV guys with external modules (PPM) very interested in simultaneous use PPM-Out and PPM-In (for headtracker).

Is it possible to do any hardware mod (e.g. trainer jack resolder) and software patch to enable such feature?

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 10:15 #9222 by hmjack2008
Replied by hmjack2008 on topic USB HID Joystick & PPM-In program
I'm sorry to cause misunderstanding, I should have to provide this photo before.

I use the stereo audio jack, the Walkera is mono jack, they are different.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 10:17 - 26 Apr 2013 10:39 #9223 by hmjack2008
Replied by hmjack2008 on topic USB HID Joystick & PPM-In program
Thank PhracturedBlue , you will finish it, you do better than me !!
Last edit: 26 Apr 2013 10:39 by hmjack2008.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 10:28 #9224 by Hexperience
Replied by Hexperience on topic USB HID Joystick & PPM-In program

vlad_vy wrote: Some FPV guys with external modules (PPM) very interested in simultaneous use PPM-Out and PPM-In (for headtracker).

Is it possible to do any hardware mod (e.g. trainer jack resolder) and software patch to enable such feature?


Yep, that's me as well at the moment. I'm using ppm out for frsky module and my fpv plane has head tracking. Obviously if/when frsky protocol is working that solves my problem. (Not having enough to eat is a problem.. head tracking not working is not really a problem on the grand scale.. :unsure: )

PB, I recall that the devo12 had something different in the ppm output. Have you had a chance to try ppm in on a devo12 yet?

CHEERS again on the great work.

There are 10 types of people in this world. Those that understand binary and those that don't.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 12:44 #9228 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program

hmjack2008 wrote: Thank PhracturedBlue , you will finish it, you do better than me !!

Thank you for providing the code. I uzed it mostly verbatim from the low-level stuff.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 12:51 - 26 Apr 2013 12:51 #9229 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program

vlad_vy wrote: Some FPV guys with external modules (PPM) very interested in simultaneous use PPM-Out and PPM-In (for headtracker).

Is it possible to do any hardware mod (e.g. trainer jack resolder) and software patch to enable such feature?


I need to open up each of my radios to see how they function. It sounds like the one hmjack used didn't need a hardware mod to access Rx pin.
certainly it is possible to replace the phono jack with a new one. The proper pins are already there, the main issue will be mounting it. Modifying the existing jack may be hard. It mostly depends on whether you can get access to the relevant trace so you can cut it. I'll give it a try.

And so far I've only actually run it on my devo8. The devo10/7e is basically the same, so it should work fine. In theory it should just work on the devo12 too. I did modify the code properly for that, but it is untested.
Last edit: 26 Apr 2013 12:51 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 19:24 #9241 by FDR
Replied by FDR on topic USB HID Joystick & PPM-In program
I wanted to translate the new language elements of the PPM config pages, and was confused about the usage of "Ch%d" and "Ch %d" strings on the trainer channel assignment.
Wouldn't it be more clear to show "PPM%d" in the spinboxes just like they are in the source list? After all they are used here as sources too...

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 19:55 #9244 by PhracturedBlue
Replied by PhracturedBlue on topic USB HID Joystick & PPM-In program
yes that is probably a good idea.
I'm still trying to decide whether I'd rather have the channels mapping be from Slave->Master (i.e choose a channel on the master for each PPM channel) or Master->Slave (i.e. choose a PPM channel for each master channel, which is how it is today).

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 20:41 #9249 by FDR
Replied by FDR on topic USB HID Joystick & PPM-In program
I think the current is more clear, especially in case of none selected.
Otherwise what would you select for an unused PPM channel? "Not used", perhaps?

Actually I couldn't decide which is which where it was Ch1 = Ch 1, so using the PPM instead will self-explanatory...

Please Log in or Create an account to join the conversation.

More
27 Apr 2013 05:10 #9261 by vlad_vy
Replied by vlad_vy on topic USB HID Joystick & PPM-In program
For me, at 'Trainer config' page, more natural will be place channels mapping by column, not by rows.

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum