Open pfeerick opened 3 years ago
At the moment (current github master), companion2{5,6} fails to correctly replay even FrSky logs. Only RSSI appears in the simulator from the log, other fields are ignored. OTX replays all the logged telemetry data.
Mentioned this in a new issue as it's a bug report rather than discussion of a feature enhancement. ;)
Extending Companion telemetry simulation capabilities by making the telemetry simulator compatible with all multimodule telemetry.
More information:
Here is more information about the problem. Some of this will be repeated from before, but I want to get all of my ideas in one message if possible.
First, when companion is simulating a model using any compatible receiver (frsky or non frsky), the sensor ids on the transmitter match those in companion simulator. This proves that when files and settings are downloaded from the transmitter into companion, the correct id's are downloaded also. From this, we know this is NOT where the problem is located. Companion seems to know what the correct id’s are, but the simulator is not using them. Here is what I think is causing the problem:
The companion simulators ‘Telemetry Simulator’ page (pic2) only contains the sensors that were available several years back, and they are all for frsky sensors.
This became a huge problem when multi-modules came on the scene. Multi modules allow the use of receivers/telemetry that are not listed on the ‘Telemetry Simulator’ page (pic 2). Also, some of the new frsky sensors (neuron esc to name one) telemetry items are not included. The id numbers for the original sensors were always used when companion simulator was used. With all of the new sensors available now, the id numbers are not known by the ‘Telemetry Simulator’ input page. We can't simulate these sensors because the ‘Telemetry Simulator’ page (pic2) does not include them, and it does not seem possible to have one page with all of the possible sensors available for simulation. As an example, I have 1 model with a non-frsky receiver which has 42 telemetry sensors discovered. 37 of these do NOT appear on companion simulators ‘Telemetry Simulator’ input page (pic2)!
How is simulated telemetry handled now?:
It appears that the way things are done now is that companion simulator takes the data (voltage, current, etc.) shown on the ‘Telemetry Simulator’ input page (pic 2), encodes it with an Id number, sends it to the Telemetry page (pic 3) which decodes it by using the id numbers and places the data in the proper place. I don't know why it is done this way. Encoding and then decoding the data seems totally unnecessary to me. The data could be simply placed into the correct spot without encoding/decoding along the way. No id numbers would be necessary. When simulating, we simply want the data being available to test our model programming.
The only ways I can think of to correct this is to either (1) delete the Telemetry Simulator input page (pic2) and in its place, show a copy of the simulated Telemetry Page (pic3) docked to one side of the simulated transmitter at all times (pic 4).
This would be dynamically built each time companion simulator is started, using the same data that builds the Telemetry page.
Or (2) completely redo the Telemetry Simulator input page. (pic 2) This would also be dynamically built when called for, but would include the Replay SD Log File choice at the top as well as the Simulate, Pause simulation when hidden., and Set RSSI to zero when paused. boxes at the top (pic5).
In either case, (1) or (2) above, I would strip out all of the companion simulator code that does the encoding/decoding of telemetry data, and simply use the data entered into the new Telemetry Simulator input page (pic4 or pic5) and place it directly into the simulated Telemetry page (pic 3). (More easily said than done I'm sure!)
I don't know why it is done this way.
If you don't do it this way but instead update the sensors directly in the simulated radio as you suggest, then you can't simulate the process of discovering new telemetry items as part of setting up your model.
From RCGroups: