kopia lustrzana https://github.com/bristol-seds/pico-tracker
[barometer] add pre-processor guards for optional barometer
rodzic
a572cc9ab6
commit
ad47ec804e
|
@ -133,9 +133,10 @@
|
||||||
/**
|
/**
|
||||||
* Barometer
|
* Barometer
|
||||||
*/
|
*/
|
||||||
#define BAROMETER_TYPE_BMP180 0
|
#define USE_BAROMETER 0
|
||||||
#define BAROMETER_TYPE_MS5607 1
|
#define BAROMETER_TYPE_BMP180 0
|
||||||
#define BAROMETER_TYPE_MS5611 0
|
#define BAROMETER_TYPE_MS5607 1
|
||||||
|
#define BAROMETER_TYPE_MS5611 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Battery ADC
|
* Battery ADC
|
||||||
|
|
|
@ -101,9 +101,11 @@ struct tracker_datapoint* collect_data(void)
|
||||||
/**
|
/**
|
||||||
* ---- Barometer ----
|
* ---- Barometer ----
|
||||||
*/
|
*/
|
||||||
|
#if USE_BAROMETER
|
||||||
struct barometer* b = get_barometer();
|
struct barometer* b = get_barometer();
|
||||||
datapoint.main_pressure = b->pressure;
|
datapoint.main_pressure = b->pressure;
|
||||||
datapoint.bmp180_temperature = (float)b->temperature;
|
datapoint.bmp180_temperature = (float)b->temperature;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GPS_TYPE_UBX
|
#ifdef GPS_TYPE_UBX
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -133,8 +133,10 @@ void init(enum init_type init_t)
|
||||||
/* i2c */
|
/* i2c */
|
||||||
i2c_bb_init();
|
i2c_bb_init();
|
||||||
|
|
||||||
|
#if USE_BAROMETER
|
||||||
/* barometer */
|
/* barometer */
|
||||||
barometer_init();
|
barometer_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (init_t != INIT_TESTCASE) {
|
if (init_t != INIT_TESTCASE) {
|
||||||
/* Telemetry init depends on gclk */
|
/* Telemetry init depends on gclk */
|
||||||
|
|
Ładowanie…
Reference in New Issue