Browse files

Update nuts_bolts.c

Removed __floatunsisf and used normal casting on line 81. 
This makes it compatible with the Arduino IDE.
  • Loading branch information...
1 parent 8e01fed commit f04489530a8375548337b89433a9016297f55f65 @Protoneer Protoneer committed Mar 13, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 nuts_bolts.c
View
3 nuts_bolts.c
@@ -25,7 +25,6 @@
#include "planner.h"
#define MAX_INT_DIGITS 8 // Maximum number of digits in int32 (and float)
-extern float __floatunsisf (unsigned long);
// Extracts a floating point value from a string. The following code is based loosely on
// the avr-libc strtod() function by Michael Stumpf and Dmitry Xmelkov and many freely
@@ -79,7 +78,7 @@ int read_float(char *line, uint8_t *char_counter, float *float_ptr)
// Convert integer into floating point.
float fval;
- fval = __floatunsisf(intval);
+ fval = (float)intval;
// Apply decimal. Should perform no more than two floating point multiplications for the
// expected range of E0 to E-4.

0 comments on commit f044895

Please sign in to comment.