18 channels for DSM2 / DSMX ?

More
03 Nov 2013 11:11 - 05 Nov 2013 14:43 #15298 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
protocol\dsm2.c, protocol\interface.h, target\devoX\target_defs.h
Last edit: 05 Nov 2013 14:43 by vlad_vy.

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

More
05 Nov 2013 08:35 - 06 Nov 2013 03:38 #15357 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
I don't quite understand how it works, but now it works as intended. You can't change protocol option if it locked to specific value.

Last version of changed source files for X-Plus channels:

DELETED
Last edit: 06 Nov 2013 03:38 by vlad_vy.

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

More
05 Nov 2013 11:59 - 06 Nov 2013 03:37 #15358 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
Devo7e has tight memory limitation for DSM2/X protocol. I had to cut conditionally (#ifndef _DEVO7E_TARGET_H_) ALL code added for X-Plus channels to enable build Devo7e firmware.

Last version of changed source files for X-Plus channels (can be build for Devo7e):

DELETED
Last edit: 06 Nov 2013 03:37 by vlad_vy.

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

More
05 Nov 2013 13:58 - 05 Nov 2013 15:27 #15359 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
From external point of view all working.
name=Model17
mixermode=Advanced
[radio]
protocol=DSM2
num_channels=20
fixed_id=123456
tx_power=10mW

[protocol_opts]
Telemetry=Off
Resolution=Steps:2048
X-Plus=On
Only requires careful testing of all modes:
1) DSM2 < 8 channels 1024 = tested = OK
2) DSM2 > 7 channels 1024 = tested = OK
3) DSM2 > 7 channels 2048 = tested = OK (DSM2 Rx must support High Resolution)
4) DSMX any number of channels = tested = OK
5) DSM2/DSMX X-Plus channels, 13 to 20 channels = ???

I havn't X-Plus Rx and XPlus8 module.
Last edit: 05 Nov 2013 15:27 by vlad_vy.

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

More
05 Nov 2013 14:43 - 06 Nov 2013 15:20 #15360 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
Firmware for Devo12:

DELETED
Last edit: 06 Nov 2013 15:20 by vlad_vy.

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

More
06 Nov 2013 03:36 - 10 Dec 2013 15:58 #15366 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
There is some change in protocol options logic:
if 'X-Plus' = 'Off', number of channels can be 1 to 12 only.
If 'X-Plus' = 'On', number of channels can be 13 to 20 only.


Last version of changed source files for X-Plus channels (can be build for Devo7e):

DELETED
Last edit: 10 Dec 2013 15:58 by vlad_vy.

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
06 Nov 2013 10:49 #15375 by rbe2012
Replied by rbe2012 on topic 18 channels for DSM2 / DSMX ?
After a short look into the changes: are you aware that the "default:" branch will normally never be invoked? Everything is handled within the PROTOCMD_xx branches.
So it might be the wrong place to implement such dependencies.
I personally would prefer finding them where the values are changed by the user, possibly with a new PROTOCMD_SETDEPENDENCIES (or whatever) which can be invoked in the config pages.
This refers also to the PROTOCMD_GETOPTIONS where you set some values - completely unexpectable from my point of view. Although values are corrected here only you can never make sure that they are correct when they are needed (e.g. if the options are never asked for).
The settings are made to the model properties so they should be done where the model is configured.

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

More
06 Nov 2013 11:47 - 06 Nov 2013 11:53 #15376 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
I'm not programmer and don't understand how it works. I think any programmer can do this work much better. For testing purposes it works and it's all that needed for now.

P.S. Probably X-Plus never will be implemented, as it happened with most of DSM telemetry.
Last edit: 06 Nov 2013 11:53 by vlad_vy.

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
06 Nov 2013 12:52 #15377 by rbe2012
Replied by rbe2012 on topic 18 channels for DSM2 / DSMX ?
Ok, we can make the code nice later. You are right - 1st comes a proof of concept.
If the addition is of use for people I don't know why it should not be integrated (as far as the resources are sufficient and not needed for important tasks). Let's complete 3.1 and see...

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

More
07 Nov 2013 03:47 - 07 Nov 2013 03:58 #15398 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
I think this code will be more clear and it also works:
const void *DSM2_Cmds(enum ProtoCmds cmd)
{
    switch(cmd) {
        case PROTOCMD_INIT:  initialize(0); return 0;
        case PROTOCMD_DEINIT: return 0;
        case PROTOCMD_CHECK_AUTOBIND: return 0; //Never Autobind
        case PROTOCMD_BIND:  initialize(1); return 0;
        case PROTOCMD_NUMCHAN:
            if (Model.proto_opts[PROTOOPTS_XPLUS] == XPLUS_ON) {
                if (Model.num_channels < 13)
                    Model.num_channels = 13;
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_2048;
            }
            if ((Model.num_channels < 8) && (Model.protocol == PROTOCOL_DSM2))
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_1024;
            return (void *)(Model.proto_opts[PROTOOPTS_XPLUS] == XPLUS_ON ? 20L : 12L);
        case PROTOCMD_DEFAULT_NUMCHAN: return (void *)7L;
        case PROTOCMD_CURRENT_ID: return Model.fixed_id ? (void *)((unsigned long)Model.fixed_id) : 0;
        case PROTOCMD_GETOPTIONS:
            if (Model.protocol == PROTOCOL_DSMX)
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_2048;
            return dsm_opts;
        case PROTOCMD_SETOPTIONS:
            if (Model.protocol == PROTOCOL_DSMX)
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_2048;
            if (Model.proto_opts[PROTOOPTS_XPLUS] == XPLUS_ON) {
                if (Model.num_channels < 13)
                    Model.num_channels = 13;
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_2048;
            }
            if ((Model.num_channels < 8) && (Model.protocol == PROTOCOL_DSM2))
                Model.proto_opts[PROTOOPTS_RESOLUTION] = RESOLUTION_1024;
            break;
        case PROTOCMD_TELEMETRYSTATE:
            return (void *)(Model.proto_opts[PROTOOPTS_TELEMETRY] == TELEM_ON ? 1L : 0L);
        case PROTOCMD_RESOLUTIONSTATE:
            return (void *)(Model.proto_opts[PROTOOPTS_RESOLUTION] == RESOLUTION_2048 ? 1L : 0L);
        case PROTOCMD_XPLUSSTATE:
            return (void *)(Model.proto_opts[PROTOOPTS_XPLUS] == XPLUS_ON ? 1L : 0L);
        default: 
            break;
    }
    return NULL;
}

If I will remove code from 'PROTOCMD_GETOPTIONS', then switching to DSMX protocol do not change 'Resolution' to 'Steps:2048' in case Devo10. Since DSMX is always 2048 it does not matter, just for not to confuse users who open protocol options.
Last edit: 07 Nov 2013 03:58 by vlad_vy.

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
07 Nov 2013 06:33 #15404 by rbe2012
Replied by rbe2012 on topic 18 channels for DSM2 / DSMX ?

vlad_vy wrote: I think this code will be more clear

Yes.

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

More
18 Dec 2013 12:37 - 18 Dec 2013 12:38 #16771 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
One month without comment, I think that no one really need in additional 8 X-Plus channels.
Last edit: 18 Dec 2013 12:38 by vlad_vy.

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

More
18 Dec 2013 13:41 #16772 by DavidT
Replied by DavidT on topic 18 channels for DSM2 / DSMX ?
I implemented it in some of the receivers I make so I am happy :-) I'd just like it for Devo8 with buttons that act as toggle switches or have 'soft' channels on the screen...
Thanks, David.

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

More
02 Jan 2014 09:08 - 02 Jan 2014 09:09 #17718 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
FDR, can you move this topic to 'Protocol Development'?
Last edit: 02 Jan 2014 09:09 by vlad_vy.

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

More
02 Jan 2014 09:13 #17719 by FDR
Replied by FDR on topic 18 channels for DSM2 / DSMX ?
Yep, done.

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

More
02 Jan 2014 09:15 - 02 Jan 2014 09:23 #17720 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
Raw (test version) source code for XPlus channels (12 normal channels + 8 XPlus channels)

File Attachment:

File Name: X-Plus.zip
File Size:12 KB


All tested and works with all possible DSM2/X Rx and modified MultiWii, not tested with original Spektrum XPlus module and Rx only.

vlad_vy wrote: 1) DSM2 <8 channels 1024 = tested = OK
2) DSM2 >7 channels 1024 = tested = OK
3) DSM2 >7 channels 2048 = tested = OK (DSM2 Rx must support High Resolution)
4) DSMX any number of channels = tested = OK
5) DSM2/DSMX X-Plus channels, 13 to 20 channels = ???

I havn't X-Plus Rx and XPlus8 module.

Attachments:
Last edit: 02 Jan 2014 09:23 by vlad_vy.

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

More
20 Oct 2015 13:48 #39074 by Cereal_Killer
Replied by Cereal_Killer on topic 18 channels for DSM2 / DSMX ?
Hi guys, first off I'm on my phone so dates arnt displayed; no clue how old this is (why is it like that anyway?)

Now that I've switched to S.BUS orangeRX's I'm wanting to get more than 12 channels. 18 are available in cleanflight but I think only 16 are controllable. Is there a current build with 16 channels active on DSMX or do I have to build my own?

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

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

More
20 Oct 2015 14:17 - 20 Oct 2015 14:25 #39075 by mwm
Replied by mwm on topic 18 channels for DSM2 / DSMX ?
Edit: just noticed that vlad_vy posted code for this, but it apparently never got tested, and hence never rolled into the build.

So current builds don't include vlad_vy's code, so you'll have to build your own. His code is over a year old, so I have no idea how well that will work with the current builds, or what to check out to get it. And you'll notice that there's no 7e files in his code. Probably because upping the channel limit on the 7E simply runs out of space.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.
Last edit: 20 Oct 2015 14:25 by mwm.

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

More
22 Apr 2021 15:15 #77361 by Theoretiker
Replied by Theoretiker on topic 18 channels for DSM2 / DSMX ?
Hi,

this thread is very old but is there an easy why to enable the XPlus in DSMX for Devo 7e.
We use the transmitter for tiny rc trucks and the receiver supports up to 18 channels, so it would be great if the Devo73 will support all 18 channels.

regards Oliver

Made some tiny radio controlled vehicles in scale 1:87
2x Devo 7e with chip modification, 4x3 way swithes, 3in1 transmitter chip
1x Devo 10
1x Devo F12e
Webseite: www.der-theoretiker.de
Youtube: www.youtube.com/user/Mikromodelle

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

More
22 Apr 2021 16:58 #77362 by vlad_vy
Replied by vlad_vy on topic 18 channels for DSM2 / DSMX ?
Devo 7e protocol module absolutely has no room for any DSMX protocol development, it's on the edge 4K size.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum