Hi all,
I made my first OpenXsensor Alti/vario, and it's working great with X9E and X8R !
Now, I would like to send MS5611 internal temperature to T1 OXS field.
I check configuration file, and I read there's some TEST var, but I don't know How To write the code, and where (maybe oXs_ms5611.h file....).
There's two variables for TEST1 field :
- test1Value > insert MS5211 temperature
- test1ValueAvailable = true in order to activate this field
Regards,
Fabien
How To use TestValue ?
Moderator: rainer
Re: How To use TestValue ?
The principe is normally to add some code in the .ino file.
Search at a function readSensors().
At the end of this function, you could add 2 lines
test1Value = oXs_MS5611.varioData.temperature ;
test1ValueAvailable = true ;
Then add TEST1 to your config.h file in order to send this data (e.g. as T1 or T2)
Still, I did not put this option in the normal code because the temperature is not really accurate. It is the internal temperature of the MS5611.
As the MS5611 is read at high frequency, his temperature is about 3-5 degrees above the temperature of air around it.
If you really want to get the real temperature, it is better to use a temperature sensor that return a voltage depending on the temperature. You can then configure oXs in order to measure this voltage and convert it into a temperature (using the multiplier/divider/offset when you transmit the data).
If you need more help, let me know
Search at a function readSensors().
At the end of this function, you could add 2 lines
test1Value = oXs_MS5611.varioData.temperature ;
test1ValueAvailable = true ;
Then add TEST1 to your config.h file in order to send this data (e.g. as T1 or T2)
Still, I did not put this option in the normal code because the temperature is not really accurate. It is the internal temperature of the MS5611.
As the MS5611 is read at high frequency, his temperature is about 3-5 degrees above the temperature of air around it.
If you really want to get the real temperature, it is better to use a temperature sensor that return a voltage depending on the temperature. You can then configure oXs in order to measure this voltage and convert it into a temperature (using the multiplier/divider/offset when you transmit the data).
If you need more help, let me know
Re: How To use TestValue ?
Thanks a lot !
As you write, I find the readSensors() function
With v5.0, there's already somthing similar, but with test3Value :
So, I will add test1Value, and let you know
I know this temperature will not be the real temperature inside the model, but it could be a good value in order to make an alarm if temperature is too hot inside (electrical glider with a black carbon canopy during summer....)
Regards,
Fabien
As you write, I find the readSensors() function
With v5.0, there's already somthing similar, but with test3Value :
Code: Select all
#ifdef VARIO
oXs_MS5611.readSensor(); // Read pressure & temperature on MS5611, calculate Altitude and vertical speed
if ( oXs_MS5611.varioData.absoluteAltAvailable == true and oXs_MS5611.varioData.rawPressure > 100000.0f ) actualPressure = oXs_MS5611.varioData.rawPressure / 10000.0 ; // this value can be used when calculating the Airspeed
test3Value = oXs_MS5611.varioData.temperature;
test3ValueAvailable = true ;
#endif
I know this temperature will not be the real temperature inside the model, but it could be a good value in order to make an alarm if temperature is too hot inside (electrical glider with a black carbon canopy during summer....)
Regards,
Fabien
Re: How To use TestValue ?
you can use test3Value too.
It does not matter if the temperature is filled in test1 or test3 as long as config.h is adapted accordingly.
It does not matter if the temperature is filled in test1 or test3 as long as config.h is adapted accordingly.
Re: How To use TestValue ?
Hi mstrens,
It works ! I can read MS5611 temperature
Thanks a lot !
It works ! I can read MS5611 temperature
Thanks a lot !