- Posts: 12
Hubsan H122D Devo 10 Model ini
- FireAngel
- Topic Author
- Offline
CHANNEL1 = 0, // Aileron
CHANNEL2, // Elevator
CHANNEL3, // Throttle
CHANNEL4, // Rudder
ChANNEL5, // Leds
CHANNEL6, // Flip (or Altitude Hold on H501S, Stabilized mode on/off on H301)
CHANNEL7, // Still camera
CHANNEL8, // Video camera
CHANNEL9, // Headless
CHANNEL10, // RTH
CHANNEL11, // GPS HOLD
I have assigned to the following switches,
CHANNEL1 = 0, // Aileron
CHANNEL2, // Elevator
CHANNEL3, // Throttle
CHANNEL4, // Rudder
RUD DR CHANNEL5, // Leds -100 OFF +100 ON
ELE DR CHANNEL6, // Flip (or Altitude Hold on H501S, Stabilized mode on/off on H301)
GEAR CHANNEL7, // Still camera
MIX CHANNEL8, // Video camera
AIL DR CHANNEL9, // Headless
FMODE CHANNEL10, // RTH
Channels 1,2,3,4,5,7,8 work ok and it flys good, But i cant get channels 6,9,10 to work these should be,
OSD on/off (dont think this works when not using original controller)
SPORT Mode on/off
Flip Direction on/off
They are working on the devo 10 channel monitor as -100 OFF +100 ON but does not do anything on the quad.
Sport and flip on the original controller work by pressing(clicking) the sticks down if that makes a difference?
How do i get these working as this quad does not use betaflight to see whats happening?
Thanks
name=H122D ORIG 501
mixermode=Advanced
type=plane
[radio]
protocol=Hubsan4
num_channels=11
fixed_id=123456
tx_power=10mW
[protocol_opts]
Format=H501
vTX MHz=5830
Telemetry=On
Freq Tune=0
[channel1]
template=simple
[mixer]
src=AIL
dest=Ch1
[channel2]
template=simple
[mixer]
src=ELE
dest=Ch2
[channel3]
template=simple
[mixer]
src=THR
dest=Ch3
[channel4]
template=simple
[mixer]
src=RUD
dest=Ch4
[channel5]
reverse=1
template=simple
[mixer]
src=RUD DR0
dest=Ch5
curvetype=expo
points=0,0
[channel6]
reverse=1
template=simple
[mixer]
src=ELE DR0
dest=Ch6
curvetype=expo
points=0,0
[channel7]
reverse=1
template=simple
[mixer]
src=GEAR0
dest=Ch7
curvetype=expo
points=0,0
[channel8]
reverse=1
template=simple
[mixer]
src=MIX0
dest=Ch8
curvetype=expo
points=0,0
[channel9]
reverse=1
template=simple
[mixer]
src=AIL DR0
dest=Ch9
curvetype=expo
points=0,0
[channel10]
reverse=1
template=simple
[mixer]
src=FMODE0
dest=Ch10
curvetype=expo
points=0,0
[trim1]
src=LEFT_V
pos=TRIMLV+
neg=TRIMLV-
[trim2]
src=RIGHT_V
pos=TRIMRV+
neg=TRIMRV-
[trim3]
src=LEFT_H
pos=TRIMLH+
neg=TRIMLH-
[trim4]
src=RIGHT_H
pos=TRIMRH+
neg=TRIMRH-
[timer2]
type=countdown
time=10
[datalog]
switch=None
rate=1 sec
[safety]
Auto=min
[gui-128x64]
V-trim=59,10,1
H-trim=5,59,3
V-trim=65,10,2
H-trim=74,59,4
Small-box=2,22,Ch3
Small-box=2,31,Timer1
Small-box=2,40,Timer2
Model=75,20
Battery=102,1
Toggle=4,10,0,3,0,RUD DR
Toggle=13,10,0,5,0,ELE DR
Toggle=22,10,0,4,0,AIL DR
Toggle=31,10,0,0,0,None
Toggle=40,10,0,0,0,None
TxPower=102,7
quickpage1=Telemetry monitor
[voice]
Please Log in or Create an account to join the conversation.
- fynn00
- Offline
- Posts: 5
With your model.ini the little race copter did not even release the rotor lock.
I had to delete the last channels and now it works like a charm. However still not able to use flip mode or headless but I don't need any of it.
Here is my model.ini
By the way: I have also used telemetry of the H122D which is just the copter's voltage. Very helpful. It start at 8.4 V and if it goes below 6.8 the copter starts to use it's speaker. On the transmitter display it is very helpful to see the actual voltage.
I have also created an icon. You can find it in the icon section of this forum.
Cheers
Flow
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
FireAngel wrote: i cant get channels 6,9,10 to work these should be,
OSD on/off (dont think this works when not using original controller)
SPORT Mode on/off
Flip Direction on/off
Those functions have never been implemented into the Hubsan X4 / H501 protocol, can you dump the SPI bus inside your stock transmitter so we can add them ?
www.deviationtx.com/forum/protocol-devel...95-spi-capture-guide
Please Log in or Create an account to join the conversation.
- AggieRC
- Offline
- Posts: 1
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Just got my logic analyzer in the mail.
I opened the H122D TX and found that the pins of the chip are actually labled:
G
SCS
SCK
O
O1 (or OI, it's just so small I cant read it properly)
T
R
+
So G is ground, SCK the clock. Now I have to find out MOSI, MISO and Enable. I think that this will be O, O1 and SCS, but I'm not completely sure. Anyone can help with this?
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Capture again with O, T and R connected as well.
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
I named the channels respectively.
First capture is the OSD-Button (H122D)
Second capture are the flips (flip button then left, flip button then right, flip button then forward, flip button then backward) (H122D)
Third capture are flight modes (Sport mode 1, Sport mode 2, Acro) (H123D)
I assumed that the pins would from the H123D controller would be the same as the H122D's.
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Please Log in or Create an account to join the conversation.
- planger
- Offline
I've looked at the dumps and I've done the following modifications in Multi here:https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Multiprotocol/Hubsan_a7105.ino
Basically I've added the H122D_FLIP, H122D_OSD, H123D_FMODES flags in the H501 sub protocol.
enum{
// flags going to packet[9] (H501S)
FLAG_H501_VIDEO = 0x01,
FLAG_H501_LED = 0x04,
FLAG_H122D_FLIP = 0x08, //H122D
FLAG_H501_RTH = 0x20,
FLAG_H501_HEADLESS1 = 0x40,
FLAG_H501_GPS_HOLD = 0x80,
};
enum{
// flags going to packet[11] (H122D & H123D)
FLAG_H123D_FMODES = 0x03, //H123D 3 FMODES: Sport mode 1, Sport mode 2, Acro
FLAG_H122D_OSD = 0x20, //H122D OSD
};
...
packet[9] = 0x02
| GET_FLAG(CH6_SW, FLAG_H501_LED)
| GET_FLAG(CH8_SW, FLAG_H501_VIDEO)
| GET_FLAG(CH13_SW, FLAG_H122D_FLIP)
| GET_FLAG(CH5_SW, FLAG_H501_RTH)
| GET_FLAG(CH11_SW, FLAG_H501_GPS_HOLD)
| GET_FLAG(CH9_SW, FLAG_H501_HEADLESS1);
//packet[10]= 0x1A;
//packet[11]= 0x00; // default
//H123D specific -> Flight modes => Does this needs to be a sub_protocol to work?
packet[11] = 0x41; // Sport mode 1
if(Channel_data[CH14]>CHANNEL_MIN_COMMAND)
packet[11]++; // 0x42 Sport mode 2
if(Channel_data[CH14]>CHANNEL_MAX_COMMAND)
packet[11]++; // 0x43 Acro
//H122D specifics -> OSD => Does this needs to be a sub_protocol to work?
packet[11]|= 0x80
| GET_FLAG(CH15_SW,FLAG_H122D_OSD);
As I've written in the code I don't know if adding the flags will not cause troubles between the different models. The good thing is that the flags do not overlap so it looks to be working from my perspective.
Pascal
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
I'll take a look at that and make a test build for GermanDroneGuy.
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
www.dropbox.com/sh/corsvt4dgi6x3ng/AAAEf...6_VdbG9HIaLQura?dl=0
Mode = Channel 12 -> 3 way: Sport 1 (-100) / Sport 2 (0) / Acro (100)
OSD = Channel 13
Flip = Channel 14
Setup your model accordingly then report
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
planger wrote: As I've written in the code I don't know if adding the flags will not cause troubles between the different models. The good thing is that the flags do not overlap so it looks to be working from my perspective.
If any H501 user complains we'll know what's wrong, but I suppose this option byte is just ignored by the H501.
Please Log in or Create an account to join the conversation.
- GermanDroneGuy
- Offline
- Posts: 16
Just came back from testing the build.
For short: Flips work on the H122D! There is one thing I noticed: The quad performs a flip as soon as you arm it, throttle up and push the right joystick in any direction. Otherwise it's working gread (give channel 14 100% for a short period of time and then press the right stick in any direction). I could not test the OSD button yet but will do this asap.
Flight modes on the H123D work great! This works better than the TX that came with the quad! Flying in the "Acro" mode is now super smooth!
Great work guys!
Please Log in or Create an account to join the conversation.
- goebish
- Offline
- I Void Warranties
- Posts: 2631
I had a look at the code and there's no reason why, this flags (0x08 in packet[9]) is only enabled if channel 14 > 0.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Model Configs, Templates, Skins
- Model Configs
- Hubsan H122D Devo 10 Model ini