I cant compile oXs with "ALT_TEMP_COMPENSATION"

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
McFly2000
Posts: 5
Joined: Fri Mar 17, 2017 7:15 pm
Country: -

I cant compile oXs with "ALT_TEMP_COMPENSATION"

Post by McFly2000 » Tue May 09, 2017 5:01 pm

When I try to compile oXs with the alt-temp-compensation the compiler stops with this error message: exit status 1
'alt_temp_compensation' was not declared in this scope.
My arduino version is 1.8.1 and oXs 8.0.6

Dirk

mstrens
Posts: 1066
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: I cant compile oXs with "ALT_TEMP_COMPENSATION"

Post by mstrens » Tue May 09, 2017 5:53 pm

I presume you are using a BMP280 baro sensor.
In fact the parameter defined by the line "#define ALT_TEMP_COMPENSATION 800" can only be used for a MS5611 sensor.

I will change the code to avoid this compilation error in the future.
In the mean time, please keep this line as comment in your config file.

If you are using a MS5611 and still get this compilation error, let me know, I will check futhermore.

McFly2000
Posts: 5
Joined: Fri Mar 17, 2017 7:15 pm
Country: -

Re: I cant compile oXs with "ALT_TEMP_COMPENSATION"

Post by McFly2000 » Tue May 09, 2017 6:16 pm

I use the MS5611 and this is my config:

Code: Select all

// ***** 4.1 - Connecting 1 or 2 barometric sensor(s)  *****
#define VARIO // set as comment if there is no vario
//#define SENSOR_IS_BMP180 // set as comment if first baro sensor is a BMP180 or BMP085 (instead of a MS5611)
//#define SENSOR_IS_BMP280 // set as comment if first baro sensor is a BMP280 (instead of a MS5611)
//#define VARIO2 // set as comment if there is no second vario
Is there another place where I can set the sensor type?

Dirk

mstrens
Posts: 1066
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: I cant compile oXs with "ALT_TEMP_COMPENSATION"

Post by mstrens » Tue May 09, 2017 6:46 pm

Ok, I see:
There is currently a bug. Even if it is a MS5611, it tries to compile the file for the BMP280 and the error occurs in this file.

To avoid the compilation error, please make a small change in file oXs_BMP280.cpp.
At line 51 there is currently
#ifdef ALT_TEMP_COMPENSATION
alt_temp_compensation = ALT_TEMP_COMPENSATION ;
#endif

Please put those 3 lines as comment (adding // in front of each line) : so it should become
//#ifdef ALT_TEMP_COMPENSATION
// alt_temp_compensation = ALT_TEMP_COMPENSATION ;
//#endif

I will fix it in a new version

McFly2000
Posts: 5
Joined: Fri Mar 17, 2017 7:15 pm
Country: -

Re: I cant compile oXs with "ALT_TEMP_COMPENSATION"

Post by McFly2000 » Tue May 09, 2017 7:43 pm

Yes it works :D Thanks for the quick help.

Dirk

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”

Who is online

Users browsing this forum: No registered users and 8 guests