Mini Cheetah Actuator Branch Superseded by: https://github.com/bgkatz/motorcontrol

Dependencies:   mbed-dev-f303 FastPWM3

Superseded by: https://github.com/bgkatz/motorcontrol

Committer:
benkatz
Date:
Thu Oct 10 15:03:12 2019 +0000
Revision:
56:fe5056ac6740
Parent:
48:74a40481740c
fixed position-sensor turn-on weirdness; ; improved output zeroing to work independent of encoder rollover angle

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 20:bf9ea5125d52 1 #ifndef MATH_OPS_H
benkatz 20:bf9ea5125d52 2 #define MATH_OPS_H
benkatz 20:bf9ea5125d52 3
benkatz 20:bf9ea5125d52 4 #define PI 3.14159265359f
benkatz 48:74a40481740c 5 #define SQRT3 1.73205080757f
benkatz 20:bf9ea5125d52 6
benkatz 20:bf9ea5125d52 7 #include "math.h"
benkatz 20:bf9ea5125d52 8
benkatz 20:bf9ea5125d52 9 float fmaxf(float x, float y);
benkatz 20:bf9ea5125d52 10 float fminf(float x, float y);
benkatz 20:bf9ea5125d52 11 float fmaxf3(float x, float y, float z);
benkatz 20:bf9ea5125d52 12 float fminf3(float x, float y, float z);
benkatz 34:51647c6c500d 13 float roundf(float x);
benkatz 20:bf9ea5125d52 14 void limit_norm(float *x, float *y, float limit);
benkatz 47:e1196a851f76 15 void limit(float *x, float min, float max);
benkatz 26:2b865c00d7e9 16 int float_to_uint(float x, float x_min, float x_max, int bits);
benkatz 26:2b865c00d7e9 17 float uint_to_float(int x_int, float x_min, float x_max, int bits);
benkatz 20:bf9ea5125d52 18
benkatz 20:bf9ea5125d52 19 #endif