- Posts: 3333
USB HID Joystick & PPM-In program
- vlad_vy
- Offline
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
This is just like all other switch assignments.vlad_vy wrote: At 'Trainer Cfg' pages 'Trainer Sw' 'None' is a button (grey), if pressed then it change next position in the list = !AIL.
for instance lets say you want to use MIX to control the trainer, but it is a 3-way.
You could set it to '!MIX0' so that both pos2 and pos3 enable trainer mode. I don't know that it is all that useful, but it is consistent with the rest of Deviation.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
That is reasonable. We could use them for PPMOut too.rbe2012 wrote: Good decision, I think. Better we have a working config where some values are constant defaults (=0?) than configs who are only valid under special conditions.
PB, must we have PPMin profiles? If you think about some kind of calibration for the inputs it will be different for the different tx. And such things as channel directions and allocation can differ too (e.g. WK vs. DX). I would appreciate to save the PPMin configuration separated from the model and include them in different model configs.
I need to think about how to implement it though. Using a full block for each profile is very wasteful, so that indicates using a single ini with all profiles in it. That can be done, but I need to figure out how to use the ini parser that way.
I'm not sure I want to save the profile name in the model though. It would be easier to just use it as a template and copy the values into the relevant PPMIn parameters. The downside is you couldn't know by looking at it which profile you had selected. I'll need to think about it some more.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
PhracturedBlue wrote:
This is just like all other switch assignments.vlad_vy wrote: At 'Trainer Cfg' pages 'Trainer Sw' 'None' is a button (grey), if pressed then it change next position in the list = !AIL.
for instance lets say you want to use MIX to control the trainer, but it is a 3-way.
You could set it to '!MIX0' so that both pos2 and pos3 enable trainer mode. I don't know that it is all that useful, but it is consistent with the rest of Deviation.
I see that, but why the 'None' is the active button and change 'AIL' but not itself.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
I can't reproduce this with the current build on either my Devo8 or the emulator.vlad_vy wrote: I see that, but why the 'None' is the active button and change 'AIL' but not itself.
when I toggle 'None' nothing happens. When I switch to AIL (which might be !AIL depending on how many times I clicked 'None') I can then toggle the '!'
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
PhracturedBlue wrote: which might be !AIL depending on how many times I clicked 'None'
This is that about I said, why 'None' change state of 'AIL'? Why 'None' is active button, but nothing happened when I press it?
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
But vlad is right: it should have no effect on "None".
But this is easily reverted so I would keep this instead of changing the code at multiple places...
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- HornetMaX
- Offline
- Posts: 8
I'm very interested in that feature as I'd like to try using a TX as USB joystick as replacement of crappy joypads for some simulation games (actually, for one simulation game, GP Bikes, amazing stuff if you're into bikes).
My understanding of the first posts is that hmjack2008 has some source files that can be "added" to deviation code in order to compile a firmware with USB joystick support. A bit messy for the average user.
Is this feature going to be integrated for good into deviation ?
I could easily buy a Devo TX just for that (I'm very sorry but I have no time to fly helis, at least at the moment, tried in the past and had to sell the whole thing, no time to use it).
MaX.
Please Log in or Create an account to join the conversation.
- notyet
- Offline
- Posts: 25
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
It seems to work pretty well in my light testing. This is enabled by selecting the 'USB HID' protocol
Note that the Devo7e is not supported. Getting the HID code to fit inside the Devo7e will require a bunch of munging to fit it into the loadable-module section. As it will be tedious work, I don't feel like working on it right now.
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
I haven't tried the code on my devo10. I'll take a look.
Please Log in or Create an account to join the conversation.
- notyet
- Offline
- Posts: 25
Please Log in or Create an account to join the conversation.
- SadSack
- Offline
- Posts: 317
If your only wanting sim use why not go wireless using A7105. At a guess could be done for $5~7 as cheap as a long usb lead Codes out there! And off the back of PB work done all ready.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- Scream
- Offline
- Posts: 73
I Can haz this magic from the nightbuilds?
I'd love to use my devo for WOWP, or any other fps... Now if you can make it ps3 compatible... u can has my 1st born son!
Cheers!
-=S=-
Cheers!
-=S=-
Please Log in or Create an account to join the conversation.
- BitOne
- Offline
- Posts: 40
Thanks a lot PB for this cool new feature !
I just pulled the last version from repo and I have a problem:
- I connected the TX to the PC via USB
- I created a model by copying an existant one
- I changed the protocol to USB HID
- => at this point, the PC doesn't see anything
[22471.192641] usb 3-1.2: new full-speed USB device number 82 using ehci-pci
[22471.264726] usb 3-1.2: device descriptor read/64, error -32
[22471.440486] usb 3-1.2: device descriptor read/64, error -32
=> the TX goes into a infinite reboot loop
- I changed back the current_model in tx.ini to a working one by switching to USB mode
=> the TX switches on correctly
- I choose the USB model and click on Reinit =
=> the TX reboots
Here is the content of the error.txt file:
[Hard fault]
devo8-v3.0.0-f2266e
R0 = 200032e8
R1 = 40022f56
R2 = 00000006
R3 = 00000001
R12 = 00000020
LR [R14] (subroutine call return address) = 08009601
PC [R15] (program counter) = 08009350
PSR = 8100002e
BFAR = e000ed38
CFSR = 00000400
HFSR = 40000000
DFSR = 00000000
AFSR = 00000000
SCB_SHCSR = 00000000
Top of Stack:2000c000
Stack Detect:2000bf74
Backtrace:
2000bf88 : 08009601
2000bf9c : 08009601
2000bfac : 08009eb3
2000bfb4 : 0801cd23
2000bfb8 : 0801ccdd
2000bfcc : 08005c8f
2000bfec : 0801cd5f
Done
But I managed to make it work once by luck: the TX was rebooting in an infinite loop. So I switched it off and I switch it on again while pressing on the ENT button to go to USB Mass Storage mode as I wanted to fix the tx.ini file. But I released the button too soon and the TX booted to the normal mode, but this time with the USB HID enabled !:
[22485.395599] usbcore: registered new interface driver usbhid
[22485.395602] usbhid: USB HID core driver
[22485.401065] input: DeviationTx Deviation GamePad as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/input/input12
[22485.401372] hid-generic 0003:0483:5710.0001: input,hidraw0: USB HID v1.00 Gamepad [DeviationTx Deviation GamePad] on usb-0000:00:1a.0-1.2/input0
But I didn't manage to make it works twice.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please post your tx.ini and model.ini as well
Edit: The error file indicates you are likely using the nightly build from tonight. If so, it is odd, because it indicates a hard-fault occurred during USB transfer. It implies possibly an uninitialized variable.
The nightly builds are built on a different machine than my testing is done, and with a different compiler version. When I get home, I'll load the nightly onto my Tx and see if I see the issue. But proivide the model.ini and tx.ini as well
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- USB HID Joystick & PPM-In program