-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbarometer.h
More file actions
17 lines (15 loc) · 744 Bytes
/
Copy pathbarometer.h
File metadata and controls
17 lines (15 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef BAROMETER_H
#define BAROMETER_H
// Both calls report failure instead of halting. A dead barometer is the flight
// computer's decision to make, not the driver's.
//
// readBarometer() is false when the chip has no new sample ready or hands back a
// pressure outside the DPS310's own 300..1200 hPa range. The sensor converts
// slower than the control loop runs, so a false return is routine - about a
// third of calls - and means "nothing new this cycle". Do not build a health
// check on a single one. It also cannot detect a chip that is still producing
// plausible-looking but wrong numbers; nothing in this firmware can. See the
// notes in barometer.cpp.
bool initBarometer();
bool readBarometer(float *pressure_hPa);
#endif