wernerdaehn / CC3D-CableCam-Controller

CC3D and STM Cube based CableCam controller
Apache License 2.0
37 stars 15 forks source link

Sbus out Remap #31

Closed Willyfan closed 6 years ago

Willyfan commented 6 years ago

Dear Werner, I'm working for add to a my app (and a new windows app, I want speak with you about this) the sbus out channel remapping. But there is something strange with $G command. If I input, for example, $G 1 2 3 4 5 6 7 8 it work, and I receive this from board:

Last RC signal received 4653116ms ago
Gimbal Out:
input channel 1 ==>      SBus out channel 1, current output = 992
input channel 2 ==>      SBus out channel 2, current output = 992
input channel 3 ==>      SBus out channel 3, current output = 992
input channel 4 ==>      SBus out channel 4, current output = 992
input channel 5 ==>      SBus out channel 5, current output = 992
input channel 6 ==>      SBus out channel 6, current output = 992
input channel 7 ==>      SBus out channel 7, current output = 992
input channel 8 ==>      SBus out channel 8, current output = 992

But if I try some other combination I have strange answer from board, for example, with $G 9 10 11 12 13 14 15 16 I receive:

Last RC signal received 4737885ms ago
Gimbal Out:
input channel 9 ==>      SBus out channel 1, current output = 992
                         SBus out channel 2, current output = 992
                         SBus out channel 3, current output = 992
                         SBus out channel 4, current output = 992
                         SBus out channel 5, current output = 992
input channel 15 ==>     SBus out channel 6, current output = 992
                         SBus out channel 7, current output = 992
                         SBus out channel 8, current output = 992

And only channel 9 and 15 are remapped, but I don't understend how. Other example, $G 2 3 4 5 6 7 8 9. I want remap my channel 2 to 1, 3 to 2 and so on, but result is this:

Last RC signal received 4885037ms ago
Gimbal Out:
input channel 9 ==>      SBus out channel 1, current output = 992
input channel 1 ==>      SBus out channel 2, current output = 992
input channel 2 ==>      SBus out channel 3, current output = 992
input channel 3 ==>      SBus out channel 4, current output = 992
input channel 4 ==>      SBus out channel 5, current output = 992
input channel 5 ==>      SBus out channel 6, current output = 992
input channel 6 ==>      SBus out channel 7, current output = 992
input channel 7 ==>      SBus out channel 8, current output = 992

It seems that output and input are exchanged. Maybe i don't understand well how work, but in my mind I want 8 channel output (1 to 8) remapped from my input, 14 or 16 channels. In this way I can remap some of my 8 first channel to output, are you sure that is correct? Anyway, i can put value higher than 8, So I think that my value after $G is for my Input channel, not output on sbus.

wernerdaehn commented 6 years ago

Was a display problem only. Remapping was correct but the list was not.