![](/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:
- 18:c2f3df4ef5fe
- Parent:
- 3:42f3821c4e54
diff -r 08f6ee55abbe -r c2f3df4ef5fe util.h --- a/util.h Thu Nov 29 17:17:52 2018 +0000 +++ b/util.h Thu Nov 29 17:21:37 2018 +0000 @@ -26,6 +26,28 @@ /** Convert string to floating point */ double cvstof(char *s); +/** Convert unsigned long to string + * + * @param n is the unsigned long to convert + * @returns char * to static char array + */ +char *cvntos(unsigned long n); + +/** Convert signed long to string + * + * @param n is the signed long to convert + * @returns char * to static char array + */ +char *cvitos(long n); + +/** Convert float/double to string + * + * @param number is the floating point number to convert + * @param digits is the number of digits after the decimal point + * @return char * to static char array + */ +char *cvftos(double number, int digits); + /** Tokenize a string * @param s is the string to tokenize * @param max is the maximum number of characters @@ -34,4 +56,4 @@ */ char *split(char *s, char *t, int max, char delim); -#endif \ No newline at end of file +#endif