From f04489530a8375548337b89433a9016297f55f65 Mon Sep 17 00:00:00 2001 From: Bertus Kruger Date: Wed, 13 Mar 2013 18:29:28 +1300 Subject: [PATCH 1/2] Update nuts_bolts.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed __floatunsisf and used normal casting on line 81. This makes it compatible with the Arduino IDE. --- nuts_bolts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nuts_bolts.c b/nuts_bolts.c index a244bfb..af6d163 100644 --- a/nuts_bolts.c +++ b/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. From 61f2bd1bc3502bc56ac05b635d3a0bf6c3555d13 Mon Sep 17 00:00:00 2001 From: Bertus Kruger Date: Wed, 13 Mar 2013 18:41:52 +1300 Subject: [PATCH 2/2] Update planner.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed inline from all functions. If this is really needed is there another way that we can get around using it? (The Arduino IDE does not recognize it)  --- planner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planner.c b/planner.c index 846e403..7fc3e96 100644 --- a/planner.c +++ b/planner.c @@ -307,14 +307,14 @@ void plan_init() memset(&pl, 0, sizeof(pl)); // Clear planner struct } -inline void plan_discard_current_block() +void plan_discard_current_block() { if (block_buffer_head != block_buffer_tail) { block_buffer_tail = next_block_index( block_buffer_tail ); } } -inline block_t *plan_get_current_block() +block_t *plan_get_current_block() { if (block_buffer_head == block_buffer_tail) { return(NULL); } return(&block_buffer[block_buffer_tail]);