drivers/sensors/bmp180.c: Fix syslog formats
This commit is contained in:
parent
5c871c6f47
commit
a0c7a14fed
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fixedmath.h>
|
#include <fixedmath.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -426,8 +427,8 @@ static void bmp180_read_press_temp(FAR struct bmp180_dev_s *priv)
|
|||||||
priv->bmp180_upress |= bmp180_getreg8(priv, BMP180_ADC_OUT_XLSB);
|
priv->bmp180_upress |= bmp180_getreg8(priv, BMP180_ADC_OUT_XLSB);
|
||||||
priv->bmp180_upress = priv->bmp180_upress >> (8 - (oss >> 6));
|
priv->bmp180_upress = priv->bmp180_upress >> (8 - (oss >> 6));
|
||||||
|
|
||||||
sninfo("Uncompensated temperature = %d\n", priv->bmp180_utemp);
|
sninfo("Uncompensated temperature = %" PRId32 "\n", priv->bmp180_utemp);
|
||||||
sninfo("Uncompensated pressure = %d\n", priv->bmp180_upress);
|
sninfo("Uncompensated pressure = %" PRId32 "\n", priv->bmp180_upress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -481,7 +482,7 @@ static int bmp180_getpressure(FAR struct bmp180_dev_s *priv)
|
|||||||
b5 = x1 + x2;
|
b5 = x1 + x2;
|
||||||
|
|
||||||
temp = (b5 + 8) >> 4;
|
temp = (b5 + 8) >> 4;
|
||||||
sninfo("Compensated temperature = %d\n", temp);
|
sninfo("Compensated temperature = %" PRId32 "\n", temp);
|
||||||
UNUSED(temp);
|
UNUSED(temp);
|
||||||
|
|
||||||
/* Calculate true pressure */
|
/* Calculate true pressure */
|
||||||
@ -512,7 +513,7 @@ static int bmp180_getpressure(FAR struct bmp180_dev_s *priv)
|
|||||||
|
|
||||||
press = press + ((x1 + x2 + 3791) >> 4);
|
press = press + ((x1 + x2 + 3791) >> 4);
|
||||||
|
|
||||||
sninfo("Compressed pressure = %d\n", press);
|
sninfo("Compressed pressure = %" PRId32 "\n", press);
|
||||||
return press;
|
return press;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user