![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Diff: util.h
- Revision:
- 2:fbc6e3cf3ed8
- Parent:
- 0:a6a169de725f
- Child:
- 3:42f3821c4e54
--- a/util.h Tue May 28 13:58:35 2013 +0000 +++ b/util.h Thu Jun 06 13:40:23 2013 +0000 @@ -12,10 +12,15 @@ #define M_PI 3.14159265358979323846 #endif +/** Clamp value between min (non-inclusive) and max (inclusive) */ +float clamp(float v, float min, float max); + /** Convert char to integer */ int ctoi(char c); + /** Convert string to floating point */ double cvstof(char *s); + /** Tokenize a string * @param s is the string to tokenize * @param max is the maximum number of characters