- Posts: 1016
which is MJX use protocol ?
- SeByDocKy
- Offline
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
SeByDocKy wrote: @Durete. Can you share to us your config file and modified hex file (c fille) ?
Sure! As soon I return home, I'm out now.
Anyway, it's the latest code from Hexfet with driven trims at rudder channel disabled and using a fixed center value (0x40 if I remember good)
I will start to test with lower values at rudder driven trim, but not too much free time last days (even in vacations )
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
Lights On:
TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 10 00 00 00 00 40 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Lights Off:
TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 12 00 00 00 00 42 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Packet 10?
Picture (Seems to be packet 14. Same flag as WLH-08 protocol ):
TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 10 00 00 00 08 48 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Video (Seems to be packet 14. Same flag as WLH-08 protocol ):
TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 10 00 00 00 10 50 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Also, I found the difference between medium/high rates mode and maybe this flag could disable the annoying autoflip feature :
In medium mode, the packet 14 is always at 02 value
TX_PAYLOAD a0 8f 00 87 00 40 40 40 c9 67 40 10 00 00 00 02 58 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
TX_PAYLOAD a0 8d 00 00 00 40 40 40 c9 67 40 10 00 00 00 04 d1 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I guess using this flag we can enable/disable the autoflip feature assigning to the Flip channel (6 as always)
Hope this info will be helpful
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
According my captures, the packet 10 change from 0x10 value to 0x11 pressing the flip button.
TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 10 00 00 00 00 40 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2.194544 < STATUS 07 00 => 2e 2e
2.194594 > STATUS 27 2e => 2e 00
2.194653 > RF_CH 25 36 => 0e 00
2.194702 = FLUSH_TX e1 00 => 0e 00
2.194755 > TX_PAYLOAD a0 00 00 00 00 40 40 40 c9 67 40 11 00 00 00 00 41 => 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
So maybe the packet 10 is:
0x10 Lights on
0x11 Perform automatic flip (with TX button)
0x12 Lights off
Thoughts?
Edit: UPPS....!!!! My bad. I didn't notice I captured the flip button with 0 throttle. Perhaps this weird Flag instead the 0x01 Flag at Packet 14 in Hexfet's code
Edit 2. I confirmed this info.It's not related to 0 throttle, Packet 10 is used by the flip button. Weird, since the X600 captures are using packet 14 for flip button...
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
Packet 10 with 0x12 value turns off the lights.
Packet 14 with 0x02 value disable the Autoflip feature even with 100% stick mouvements. Probably using 0x00 value enable the low rate mode (useless for us since we limit the rates using the Deviation Mixer).
Since you know my programming skills are very basic, I tested modifying Hexfet's code at hand
So can't provide a code with those changes
I'm only trying to do my best helping to finish the protocol
(and BTW learn some C programming )
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
I attached my model file, icon file and C file (99.9999999999% Hexfet's code )
I only disable the driven trims at rudder channel, and disable the autoflip feature modifying packet 14 value.
Credits for the icon file to some user from Deviation Forum, sorry I don't remember where I found.
Be careful when testing
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
I have fully working light control, Autoflip enable/disable with max stick position and Autoflip button, at least on my X800.
Channel 5 is light control
Channel 6 is autoflip enable/disable (with max stick input)
Channel 7 is Picture
Channel 8 is Video
Channel 9 is Headless
Channel 10 is RTH
Channel 11 is Autoflip button.
Since my programming skills are very very basic, I don't know how to reverse the functions at the code, so channel 5 (light control) is working reversed. At -100 value lights are on, at 100% value are off.
I can't test Headless and RTH since the X800 doesn't have those functions, but I guess continue working.
Anyone with an X400/X600 or even X900 can test? Especially interested to test the extra functions (Headless, RTH, Lights, Autoflips, Picture, Video ...)
Here is the build:
dl.dropboxusercontent.com/u/14941708/dev...e-v4.0.1-eabe723.zip
Since I'm not a coder, and maybe the code is not right, or even unsafe to use, I will not post the code to everyone. Only to recognised developers (Hexfet, are you reading ? )
As I wrote before, this is 99.99999999% Hexfet's code, so thank you again for you hard work for Deviation Community
My model file valid for 7e with 2 extra switches:
Throttle Trim Up . Picture
Throttle Trim Down. Video.
Rudder Trim right. On/Off lights
SWB Switch . 3 rates.
Hold 1. Cut throttle
Fmod1 Activate Flips at full stick input.
Exit. Autoflip button.
Please Log in or Create an account to join the conversation.
- vasiliy_gr
- Offline
- Posts: 67
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
This is good news because at least we know the flip controls are working also on a different quadcopter than X800 (X400).
The pitch and roll channels are using Dynamic Trims (Hexfet code) but I disabled Dynamic Trims at rudder channel because I found a weird behavior on this channel when using Dynamic trims. I guess the receiver is not receptive to use this trick . So is unlikely we can increase the stock yaw rate. In my opinion the yaw rate is not too bad since I think the X800 and his bigger brothers are outdoor flyers. Anyway probably should be better a faster yaw rate for the X900.
I also noticed Vasily's impression about the rudder channel with bigger values than 80%, I think the yaw rate is even slightly decreased when we reach values near 100%.
The rudder channel is using now the same values as stock TX, so perhaps the stock TX is using an expo curve? Who knows...
@Vasily
Did you noticed any similar behavior at rudder channel using the stock TX? Since I only have my X800 for about a week, I have flown with stock tx about 2 times...
Now we need someone test this build using the X600, X900 and maybe ¿X500? It's very important to test the extra functions to check those functions continues working in other models.
Probably I could test picture and video functions with an X300C in a few days/weeks.
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
The yaw rate is increased till about 80%. After this point the rate isn't increased any more. I have the feel the rate is even slightly decreased from about 90-95% till 100%.
Tested on X800.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
I don't have time to do more test these days,sorry,I tested only few minutes on my X600.
Channel 5 is light control => No function (X600 stock TX has no this function.)
Channel 6 is autoflip enable/disable (with max stick input) => OK
Channel 7 is Picture => Not tested, I don't have x600 cam.
Channel 8 is Video => Not tested, I don't have x600 cam.
Channel 9 is Headless => Light is flashing,but orientation is not locked,need more test,I can't figure it out now.
Channel 10 is RTH => No works,same as normal mode after i activated it.
Channel 11 is Autoflip button. => OK
I will do more test for headless funtion if I have time these two days,thanks Durete for your help!
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
@DC59
Did you use my model file?
I found, I uploaded a model file with safety switch at channel 10 (RTH) . If you used my model file that's the problem with RTH because I didn't modify code on this packet from last (working) version from Hexfet.
About the Headless feature, makes more sense to not work since a modify the Packet related Please test more when you have more time.
I uploaded my model file at my previous post removing the safety feature at channel 10.
I tested the build using the emulator and is working as expected (0x01 at packet 11 when enable RTH)
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1891
Seems to me you're doing fine! Anyone building your changes would know to be careful.Durete wrote: Ok, almost there ...
Since I'm not a coder, and maybe the code is not right, or even unsafe to use, I will not post the code to everyone. Only to recognised developers (Hexfet, are you reading ? )
Best would be to make a pull request against my repo. Or you can pm a link to your code.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
Durete wrote: Damn!
@DC59
Did you use my model file?
I found, I uploaded a model file with safety switch at channel 10 (RTH) . If you used my model file that's the problem with RTH because I didn't modify code on this packet from last (working) version from Hexfet.
About the Headless feature, makes more sense to not work since a modify the Packet related Please test more when you have more time.
I uploaded my model file at my previous post removing the safety feature at channel 10.
I tested the build using the emulator and is working as expected (0x01 at packet 11 when enable RTH)
Yes , I used your model file, sorry I didn't check ch10 setting before I tested it!
I'll confirm that ASAP.
Thanks!
Please Log in or Create an account to join the conversation.
- Richard96816
- Offline
- Posts: 208
Durete wrote: Ok, just tested with Stock TX and I think the behaviour is the same.
The yaw rate is increased till about 80%. After this point the rate isn't increased any more. I have the feel the rate is even slightly decreased from about 90-95% till 100%.
Tested on X800.
Perhaps dynamic trim needs to be configured with this in mind.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
I tried X600 one more times with new model file , CH10 RTH is now working good!
CH9 Headless mode still not OK, it's weird , when I activated headless if head orientation is 12 o'clock to 3 o'clock it's like normal ,nothing is changed, when I turned it to 6 o'clock or 9 o'clock I can fill DR rate is changed , it moved very slow and X600 always move to left side whatever you moved any stick,I can't control it.
Please Log in or Create an account to join the conversation.
- Durete
- Offline
- Posts: 610
hexfet wrote:
Seems to me you're doing fine! Anyone building your changes would know to be careful.Durete wrote: Ok, almost there ...
Since I'm not a coder, and maybe the code is not right, or even unsafe to use, I will not post the code to everyone. Only to recognised developers (Hexfet, are you reading ? )
Best would be to make a pull request against my repo. Or you can pm a link to your code.
Thanks for your kind words
I'm trying to do my best in the hope to help as much as possible.
But since I'm a hardware man and never programmed in C before, is really difficult to me. I'm learning on the way .
This a challenge to me
I will send to you by PM your code modified by me to amend my mistakes
@DC59
Thanks for testing
So now, we need to figure out how to enable Headless in Medium rate.
Probably the receiver is erratic since is receiving a not recognized flag.
Please, could you take an SPI capture for headless mode on/off in Medium Rate (no autoflip)?
Probably this capture is not needed for anyone with programming skills, but since I'm not an expert I need to see it
Thanks!
For everyone.
Should be helpful a test for light controls/Headless/RTH with an X900 (I guess the X900 has Headless/RTH)
Please Log in or Create an account to join the conversation.
- Richard96816
- Offline
- Posts: 208
Better than relying on calibration at startup.
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
@DC59
Thanks for testing
So now, we need to figure out how to enable Headless in Medium rate.
Probably the receiver is erratic since is receiving a not recognized flag.
Please, could you take an SPI capture for headless mode on/off in Medium Rate (no autoflip)?
Probably this capture is not needed for anyone with programming skills, but since I'm not an expert I need to see it
No problem! I'll capture it, but it will take some time because I'm very busy these days,I'll try my best ASAP,Thanks!
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
Richard96816 wrote: May be best to calibrate headless mode before flying to rule out confusion on heading.
Better than relying on calibration at startup.
Yes, I calibrated headless mode every time I landed or crashed or before took off .... but it still the same
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- which is MJX use protocol ?