Strange behavior of DEVO 10

More
16 Jan 2018 15:43 #66902 by Serg_S
Strange behavior of DEVO 10 was created by Serg_S
Hello all!

I updated my DEVO10 from the build 24f4cf6 from 27/03/2017 to the last night build e292f38.
Now I observe the strange behavior of the transmitter.
On the main page, instead of the virtual channel values, the transmitter shows nonsense (contents of boxes with real channels, timers, battery voltage, etc.).

In the attached video:
On the left side of the video the transmitter with the old firmware, on the right side - with the new firmware.
On the left side of the tranmitter's display are boxes that show the values ​​(output) of virtual channels.
On the right side of the tranmitter's display are boxes that show the output of real channels or timers.
When changing the value of the source of the virtual channel mixer, then to the corresponding box (on the left of the tranmitter's display) instead of the virtual channel output shows the value from the boxes on the right or the battery voltage.



The channel monitor shows the virtual channel values ​​correctly.

The transmitter works this way on any of the latest available night build.
If I restore build 24f4cf6, then the transmitter again works correctly.

The model.ini file is attached.
Attachments:

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

More
16 Jan 2018 15:49 #66903 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
Do you update filesystem to new version?

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

More
16 Jan 2018 15:59 #66904 by Serg_S
Replied by Serg_S on topic Strange behavior of DEVO 10
Yes, except sound.ini, tx.ini and model*.ini

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

More
16 Jan 2018 16:02 #66905 by Serg_S
Replied by Serg_S on topic Strange behavior of DEVO 10

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

More
16 Jan 2018 17:05 #66906 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
I can't use your model file with latest devo10 emulator, it will crush. But, with deleted main page layout I can use it. Something in your layout is incompatible with latest Nightly Builds. It's not good.

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

More
16 Jan 2018 17:19 - 16 Jan 2018 17:31 #66907 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
It's definitely related to commit e50fce3 - "Add ability to specify display scale/format string" 28 Nov 2017 from "nknotts".
Last edit: 16 Jan 2018 17:31 by vlad_vy.

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

More
16 Jan 2018 18:24 - 16 Jan 2018 18:28 #66908 by Serg_S
Replied by Serg_S on topic Strange behavior of DEVO 10
If the boxes show only real channels or timers, then the emulator works fine. For example:

[gui-128x64]
V-trim=0,11,1
Toggle=5,11,0,72,0,RUD DR
Toggle=14,11,0,5,0,ELE DR
Toggle=23,11,0,65,197,MIX
Toggle=32,11,0,69,0,AIL DR
Toggle=41,11,0,64,194,FMODE
Big-box=4,23,Ch1
Big-box=4,36,Ch2
Small-box=4,50,Ch3

H-trim=4,60,3
Battery=51,11
TxPower=51,17
Bargraph=52,24,Ch6
Bargraph=57,24,Ch1
Bargraph=62,24,Ch4
Bargraph=67,24,Ch3
Bargraph=72,24,Ch2
Big-box=76,11,Timer1
Small-box=76,26,Timer2
Small-box=76,38,Timer3
Small-box=76,50,Timer4

H-trim=75,60,4
V-trim=124,11,2
quickpage1=Channel monitor
quickpage2=Telemetry monitor



But with virtual channels, the emulator will crash.
Attachments:
Last edit: 16 Jan 2018 18:28 by Serg_S.

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

More
16 Jan 2018 18:56 - 16 Jan 2018 18:57 #66910 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
It look like scale/format is not valid for virtual channels, so we have format undefined and scale = 0, therefore:

sprintf(tempstring, val_format, val_raw/val_scale); => division by 0 and emulator will crash.
Last edit: 16 Jan 2018 18:57 by vlad_vy.

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

More
16 Jan 2018 19:34 #66912 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
I will open issue about problem.

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

More
17 Jan 2018 06:41 - 17 Jan 2018 06:45 #66920 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
At any case this commit has other problems:
[channel3]
display-scale=1000
display-scale=1000
display-format=%2d%%
template=simple
[mixer]
src=THR
dest=Ch3

Why "display-scale=1000" appears twice???

I recommend revert this commit.
github.com/DeviationTX/deviation/pull/328
Last edit: 17 Jan 2018 06:45 by vlad_vy.

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

More
17 Jan 2018 07:48 #66922 by FDR
Replied by FDR on topic Strange behavior of DEVO 10
First let the developer know there is an issue, he might correct it...
I've informed him in the thread, which was about that change:
www.deviationtx.com/forum/6-general-disc...custom-display-units

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

More
17 Jan 2018 15:59 #66935 by nknotts
Replied by nknotts on topic Strange behavior of DEVO 10
I've issued a pull-request that addresses the problem with virtual channels.

With regards to "display-scale" showing up multiple times in the model, I have witnessed this behavior but have also seen it with other options as well. Since this issue didn't impair the loading of the model, I did not investigate further.

I can investigate the duplicate entries but am not quite sure where to begin. Looking at github.com/DeviationTX/deviation/pull/32...05f5b2a6ac9e31fR1231 , I see nothing special about the entries that I added. Any suggestions would be welcome.

I apologize for any grief I've caused.

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

More
17 Jan 2018 16:36 #66936 by FDR
Replied by FDR on topic Strange behavior of DEVO 10
Merged, it will be in tomorrow's nightly builds...

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

More
18 Jan 2018 04:06 #66953 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
I think "display-scale" duplicate entries related to "_seclimit" struct, it contains CHAN_DISPLAY_SCALE but not CHAN_DISPLAY_FORMAT, so we have only "display-scale" duplicated.

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

More
18 Jan 2018 05:25 - 18 Jan 2018 05:29 #66955 by vlad_vy
Replied by vlad_vy on topic Strange behavior of DEVO 10
If I comment out this line at src\config\model.c:
static const struct struct_map _seclimit[] = {
    {CHAN_LIMIT_SAFETYSW,  OFFSET_SRC(Model.limits[0], safetysw), 0},
    {CHAN_LIMIT_SAFETYVAL, OFFSETS(Model.limits[0], safetyval), 0},
    {CHAN_LIMIT_MAX,       OFFSET(Model.limits[0], max), DEFAULT_SERVO_LIMIT},
    {CHAN_LIMIT_SPEED,     OFFSET(Model.limits[0], speed), 0},
    {CHAN_SCALAR,          OFFSET(Model.limits[0], servoscale), 100},
    {CHAN_SCALAR_NEG,      OFFSET(Model.limits[0], servoscale_neg), 0},
    {CHAN_SUBTRIM,         OFFSETS(Model.limits[0], subtrim), 0},
    //{CHAN_DISPLAY_SCALE,   OFFSETS(Model.limits[0], displayscale), DEFAULT_DISPLAY_SCALE},
};

I get at modelXX.ini
[channel3]
display-scale=1000
display-format=%2d%%
template=simple
[mixer]
src=THR
dest=Ch3

And it looks like all work as before.
Last edit: 18 Jan 2018 05:29 by vlad_vy.

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

More
18 Jan 2018 11:47 - 18 Jan 2018 11:48 #66962 by nknotts
Replied by nknotts on topic Strange behavior of DEVO 10
I've issued a pull-request that addresses the duplicate de/serialization of 'display-scale'.

All entries in _seclimit are de/serialized via the write_int / assing_int functions. To prevent the duplications, I removed the additional de/serialization code for 'display-scale'.
Last edit: 18 Jan 2018 11:48 by nknotts.

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

More
19 Jan 2018 15:06 #66997 by Serg_S
Replied by Serg_S on topic Strange behavior of DEVO 10

FDR wrote: Merged, it will be in tomorrow's nightly builds...

Thanks, now the transmitter works correctly.

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

Time to create page: 0.046 seconds
Powered by Kunena Forum