Add first draft for pressure calulation a see level
This commit is contained in:
parent
ff6ab5755d
commit
d51df5dd64
@ -1,3 +1,6 @@
|
||||
// Get Current altitude with http://fr.mygeoposition.com/
|
||||
#define ALTITUDE 130
|
||||
|
||||
SFE_BMP180 bmp180;
|
||||
int bmp180Connected = 0;
|
||||
|
||||
@ -32,8 +35,10 @@ int BMP180GetTempAndPressure(double &t, double &p) {
|
||||
{
|
||||
delay(status);
|
||||
status = bmp180.getPressure(p, t);
|
||||
if (status != 0)
|
||||
if (status != 0){
|
||||
p = bmp180.sealevel(p, ALTITUDE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user