mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
cleanup of sensor readings and sensor driver API reorganization part 1
documented L3G4200D driver why 0x28 read was suddenly turning into 0xA8 removed old wiimotion averaging cruft from computeIMU NOT FLIGHT TESTED git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@403 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
6d3467c759
commit
14893afb32
10 changed files with 75 additions and 63 deletions
12
src/utils.c
Normal file
12
src/utils.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "board.h"
|
||||
#include "mw.h"
|
||||
|
||||
int constrain(int amt, int low, int high)
|
||||
{
|
||||
if (amt < low)
|
||||
return low;
|
||||
else if (amt > high)
|
||||
return high;
|
||||
else
|
||||
return amt;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue