mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Implement motors output desaturation
So the drone continues stabilization on max thrust.
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#define degrees(rad) ((rad)*RAD_TO_DEG)
|
||||
|
||||
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
|
||||
template<typename T> T max(T a, T b) { return a > b ? a : b; }
|
||||
template<typename T> T min(T a, T b) { return a < b ? a : b; }
|
||||
|
||||
long map(long x, long in_min, long in_max, long out_min, long out_max) {
|
||||
const long run = in_max - in_min;
|
||||
|
||||
Reference in New Issue
Block a user