OpenTX Companion simulator - no voltage readings
OpenTX Companion simulator - no voltage readings
When using OpenTX Companion simulator (2.2, but same I have on 2.1) I cannot get voltages to work. I put some values into RxBt and A1 fields (respectively 5,20V and 8.40V), but in radio simulator I cannot get these values. In the same time I can get other values, like RSSI.
In fact even on first screen all voltages are shown as zero (grayed).
What am I doing wrong?
In fact even on first screen all voltages are shown as zero (grayed).
What am I doing wrong?
Re: OpenTX Companion simulator - no voltage readings
Because you have the ratio set to 0, you need to set it right in the sensor settings.
Re: OpenTX Companion simulator - no voltage readings
Thanks for your prompt answer Kilrah.
This is what I suspected in the beginning, but the ratio per default is set to 13.2...
Any other idea?
This is what I suspected in the beginning, but the ratio per default is set to 13.2...
Any other idea?
Re: OpenTX Companion simulator - no voltage readings
I have installed Companion 2.2 on my second computer (Mac OS X, previous was PC with Windows) and got the same effect. So seems that it is repeatable, even cross platform. Anybody having similar issue?
Re: OpenTX Companion simulator - no voltage readings
Are you using the simulator form within Companion or the standalone simulator? How are you creating the sensors, meaning are they sensors that were created by the radio or are you using the telemetry simulator to create them?
I'm guessing you are using the telemetry simulator to create the sensors by starting the telemetry simulator and then discover sensors in the radio simulator to create the sensors. If that is the case I can duplicate the problem. I will open an issue against openTX 2.2 for the problem I see and propose a fix. I'll post the URL to the issue after I create it so you can see if it fits the problem you are having.
Jim
I'm guessing you are using the telemetry simulator to create the sensors by starting the telemetry simulator and then discover sensors in the radio simulator to create the sensors. If that is the case I can duplicate the problem. I will open an issue against openTX 2.2 for the problem I see and propose a fix. I'll post the URL to the issue after I create it so you can see if it fits the problem you are having.
Jim
Re: OpenTX Companion simulator - no voltage readings
I have created issue 5090 https://github.com/opentx/opentx/issues/5090 on github for the problem I see. @rcyoda I don't have enough information about you problem to know if my proposed fix will correct your problem or not, but you can take a look at it and see what you think.
Jim
Jim
Re: OpenTX Companion simulator - no voltage readings
Hi Jim, I was testing it from within Companion, but today I had the same effect on standalone simulator.
Either way I was simply opening Telemetry Simulator window, enter some values into RxTX and A1 voltage fields, mark "Simulate", and then go to Radio Simulator, switch to telemetry page in radio window (using buttons, like on real radio) and hit "Discover new sensors" from there. Every time I got zero values on these sensors, while other - like RSSI or Cels - were working properly.
Good to know that it is actually kind of bug and thanks for creating an issue entry.
I'm not sure if I understood your proposed solution correctly. I thought that these fields are already editable (in Telemetry Simulator window) and its values should be simply passed to Radio Simulator, where they would update normally, like other sensors do. In other worst it seems that some values entered in Telemetry Windows are not actually passed to Radio Simulator. But obviously I do not have any insight knowledge how it works, so maybe it is not that easy...
Either way I was simply opening Telemetry Simulator window, enter some values into RxTX and A1 voltage fields, mark "Simulate", and then go to Radio Simulator, switch to telemetry page in radio window (using buttons, like on real radio) and hit "Discover new sensors" from there. Every time I got zero values on these sensors, while other - like RSSI or Cels - were working properly.
Good to know that it is actually kind of bug and thanks for creating an issue entry.
I'm not sure if I understood your proposed solution correctly. I thought that these fields are already editable (in Telemetry Simulator window) and its values should be simply passed to Radio Simulator, where they would update normally, like other sensors do. In other worst it seems that some values entered in Telemetry Windows are not actually passed to Radio Simulator. But obviously I do not have any insight knowledge how it works, so maybe it is not that easy...
Re: OpenTX Companion simulator - no voltage readings
It's not a bug. The simulator reads the existing settings from the eeprom when loaded and populates the telemetry simu ratio to match. There is no way for the telemetry simu to either read or set the ratio in the radio afterwards.
With the standalone simu if you do that (enable in simu and discover), once you close everything and reopen you'll have things working the way you want. In companion it's not possible.
With the standalone simu if you do that (enable in simu and discover), once you close everything and reopen you'll have things working the way you want. In companion it's not possible.
Re: OpenTX Companion simulator - no voltage readings
But why it is actually working for other sensors then? like RSSI or Cels?
Re: OpenTX Companion simulator - no voltage readings
Becasue none of these depend on ratio, they're values with a meaning that is predetermined in the protocol.
The A1/A2 analogs however are legacy and have no meaning or definition of their own, they're just a unit-less number from 0 to 255 that could be anything. The ratio is needed to turn them into something useful to display. So the radio needs a ratio to know what to display when it receives 255, and in turn the telemetry simulator needs to know that ratio too so that it knows what value to send when you set it to say 9.6V, instead of requiring you to enter 185 (assuming default 13.2 ratio).
The A1/A2 analogs however are legacy and have no meaning or definition of their own, they're just a unit-less number from 0 to 255 that could be anything. The ratio is needed to turn them into something useful to display. So the radio needs a ratio to know what to display when it receives 255, and in turn the telemetry simulator needs to know that ratio too so that it knows what value to send when you set it to say 9.6V, instead of requiring you to enter 185 (assuming default 13.2 ratio).
Re: OpenTX Companion simulator - no voltage readings
Many thanks for this detailed explanation Kilrah.
I will check it with standalone simulator then.
I will check it with standalone simulator then.
Re: OpenTX Companion simulator - no voltage readings
Standalone simulator works on Windows. How to launch it on Mac OS X? I cannot find simulator executable...
Re: OpenTX Companion simulator - no voltage readings
I don't think it's ever been part of the distribution on OSX for some reason.
Re: OpenTX Companion simulator - no voltage readings
So is there any way to proper simulation of analog voltages on Mac OS X?
Re: OpenTX Companion simulator - no voltage readings
Yes, set up your sensors in companion before launching the simulator...
-
- Posts: 183
- Joined: Sat Mar 29, 2014 10:44 pm
- Country: United States
- Location: Coral Springs, FL
Re: OpenTX Companion simulator - no voltage readings
I read this thread, and it looks I have a slightly different issue also related to the voltages.
My problem is with the LiPo voltage sensor information.
The two values I cannot see in the simulation are Cels and Vmin. However, they work on the transmitter and also I can see both in the Log viewer.
I don't know if I am missing something but I would like to know which is the problem.
Attached is included clarification information.
My problem is with the LiPo voltage sensor information.
The two values I cannot see in the simulation are Cels and Vmin. However, they work on the transmitter and also I can see both in the Log viewer.
I don't know if I am missing something but I would like to know which is the problem.
Attached is included clarification information.
- Attachments
-
- PC-9-01-2018-02-06-Session2.csv
- (77.44 KiB) Downloaded 384 times
Richard
Re: OpenTX Companion simulator - no voltage readings
The list of sensors in the telemetry simulator are not dynamically generated, meaning they are hard coded and not created from what is on the radio or in the log file. So since Vmin is not one of the provided simulated sensors you will not be able to simulate it or see it on log replay. Cels not updating in log replay looks like a bug in the simulator, however. Log replay reads the log header to match the log to the simulated sensors. For Cels it is looking for Cels(gRe) and your log has Cels(V) where V is the units (volt) and I have no idea what unit gRe is/was. If you open your log file in a text editor and change Cels(V) in the first line to Cels(gRe) you will see that log replay now updates Cels on log replay.
Jim
Jim
Re: OpenTX Companion simulator - no voltage readings
Cels not playing is normal. On the radio it is a "special" sensor containing 6 voltage values, but in the logs Cels is logged as the sum of those, the detail is lost.
Re: OpenTX Companion simulator - no voltage readings
Yes, but looking at the code it looks like the intent was to have log replay display the total cels value in the Cel1 position:
case CELS_GRE:
ui->cell1->setValue(columnData[info.dataIndex].toDouble());
However it is looking for Cels(gRe) in the log header instead of Cels(V):
colToFuncMap.insert("Cels(gRe)", CELS_GRE);
As I said changing Cels(V) to Cels(gRe) in the log header makes it replay the total voltage into the Cel1 1 position. I don't know if this ever worked or if the log header got changed somewhere and broke it. Adding a colToFuncMap.insert("Cels(V)", CELS_GRE); line would probably make it work as intended (or changing gRe to V). Actually the whole telemetry simulator would benefit from being redone to be dynamically created from model data if somebody with the ability had the time and inclination. Unfortunately I don't have the ability.
Jim
case CELS_GRE:
ui->cell1->setValue(columnData[info.dataIndex].toDouble());
However it is looking for Cels(gRe) in the log header instead of Cels(V):
colToFuncMap.insert("Cels(gRe)", CELS_GRE);
As I said changing Cels(V) to Cels(gRe) in the log header makes it replay the total voltage into the Cel1 1 position. I don't know if this ever worked or if the log header got changed somewhere and broke it. Adding a colToFuncMap.insert("Cels(V)", CELS_GRE); line would probably make it work as intended (or changing gRe to V). Actually the whole telemetry simulator would benefit from being redone to be dynamically created from model data if somebody with the ability had the time and inclination. Unfortunately I don't have the ability.
Jim
-
- Posts: 183
- Joined: Sat Mar 29, 2014 10:44 pm
- Country: United States
- Location: Coral Springs, FL
Re: OpenTX Companion simulator - no voltage readings
I confirmed jtaylor's change to the log file header. I guess that was a miss when assigning units to Cels in the code.
Richard
-
- Posts: 183
- Joined: Sat Mar 29, 2014 10:44 pm
- Country: United States
- Location: Coral Springs, FL
Re: OpenTX Companion simulator - no voltage readings
jtaylor, would you give me a link to the code, please?
Richard
Re: OpenTX Companion simulator - no voltage readings
https://github.com/opentx/opentx
specifically https://github.com/opentx/opentx/blob/2 ... rysimu.cpp
I could submit a one line change to add colToFuncMap.insert("Cels(V)", CELS_GRE); to make it work the same way as editing the header does if it would be useful. Don't think anybody has ever complained so can't be used too much.
Jim
specifically https://github.com/opentx/opentx/blob/2 ... rysimu.cpp
I could submit a one line change to add colToFuncMap.insert("Cels(V)", CELS_GRE); to make it work the same way as editing the header does if it would be useful. Don't think anybody has ever complained so can't be used too much.
Jim
-
- Posts: 183
- Joined: Sat Mar 29, 2014 10:44 pm
- Country: United States
- Location: Coral Springs, FL
Re: OpenTX Companion simulator - no voltage readings
Got you. Thank you for the link and suggestion.
Don't know if I will end up making the modification, but if I do, after testing I will let you know.
Don't know if I will end up making the modification, but if I do, after testing I will let you know.
Richard