diff --git a/changelog.md b/changelog.md index 4d4c981..0a216fc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,23 @@ ## grblHAL changelog + 20241204 + +Core: + +* Changed deprecated calls to `isinff()` and `isnanf()` to new \(C99\) versions. + +Drivers: + +* RP2040: CMakeLists.txt fixes for RP2350 builds. + +* STM32F4xx: disabled broken support for sensorless homing for LongBoard32 \(SLB\). Support for this board is still WIP. + +Plugins: + +* Motors , spindle and misc: Changed deprecated calls to `isinff()` and `isnanf()` to new \(C99\) versions. + +--- + Build 20241128 Core: @@ -20,7 +38,7 @@ Drivers: Plugins: -* Trinamic: removed superfluous semicolon.Ref. [issue #15](https://github.com/grblHAL/Plugins_motor/issues/15). +* Trinamic: removed superfluous semicolon. Ref. [issue #15](https://github.com/grblHAL/Plugins_motor/issues/15). * Networking: added some files to _CMakeLists.txt_, used by RP2350 driver. diff --git a/gcode.c b/gcode.c index b99d140..66e9713 100644 --- a/gcode.c +++ b/gcode.c @@ -940,7 +940,7 @@ status_code_t gc_execute_block (char *block) if(gc_state.skip_blocks && letter != 'O') return Status_OK; - if(user_mcode != UserMCode_NoValueWords && isnanf(value)) + if(user_mcode != UserMCode_NoValueWords && isnan(value)) FAIL(Status_BadNumberFormat); // [Expected word value] g65_words.value = 0; @@ -969,7 +969,7 @@ status_code_t gc_execute_block (char *block) // a good enough compromise and catch most all non-integer errors. To make it compliant, // we would simply need to change the mantissa to int16, but this add compiled flash space. // Maybe update this later. - if(!isnanf(value)) { + if(!isnan(value)) { int_value = (uint32_t)truncf(value); mantissa = (uint_fast16_t)roundf(100.0f * (value - int_value)); } @@ -2600,7 +2600,7 @@ status_code_t gc_execute_block (char *block) // TODO: fail? } - if(thread.end_taper_type != Taper_None && thread.end_taper_length > abs(thread.z_final - gc_state.position[Z_AXIS]) / 2.0f) + if(thread.end_taper_type != Taper_None && thread.end_taper_length > fabsf(thread.z_final - gc_state.position[Z_AXIS]) / 2.0f) FAIL(Status_GcodeValueOutOfRange); if(gc_block.words.r) diff --git a/kinematics/delta.c b/kinematics/delta.c index 945d2b5..44221c3 100644 --- a/kinematics/delta.c +++ b/kinematics/delta.c @@ -322,7 +322,7 @@ static void get_cuboid_envelope (void) for(z = 0; z < settings.axis[X_AXIS].steps_per_mm * 2.0f * M_PI ; ++z) { pos[0] = pos[1] = pos[2] = sr * (float)z; transform_to_cartesian(mpos.values, pos); - if(!isnanf(mpos.x)) { + if(!isnan(mpos.x)) { if(minz > mpos.z) minz = mpos.z; if(maxz < mpos.z) @@ -589,7 +589,7 @@ static bool delta_check_travel_limits (float *target, axes_signals_t axes, bool #endif if(!is_cartesian) { - if(isnanf(transform_to_cartesian(pos.values, target)[A_MOTOR])) + if(isnan(transform_to_cartesian(pos.values, target)[A_MOTOR])) return false; } diff --git a/ngc_expr.c b/ngc_expr.c index 39bc6c6..7eb136b 100644 --- a/ngc_expr.c +++ b/ngc_expr.c @@ -820,9 +820,9 @@ status_code_t ngc_read_real_value (char *line, uint_fast8_t *pos, float *value) else status = (read_float(line, pos, value) ? Status_OK : Status_BadNumberFormat); - if(isnanf(*value)) + if(isnan(*value)) status = Status_ExpressionInvalidResult; // Calculation resulted in 'not a number' - else if(isinff(*value)) + else if(isinf(*value)) status = Status_ExpressionInvalidResult; // Calculation resulted in 'not a number' return status; diff --git a/nuts_bolts.c b/nuts_bolts.c index 87f1414..bb8c9b1 100644 --- a/nuts_bolts.c +++ b/nuts_bolts.c @@ -306,7 +306,7 @@ bool read_float (char *line, uint_fast8_t *char_counter, float *float_ptr) // Returns true if float value is a whole number (integer) bool isintf (float value) { - return !isnanf(value) && fabsf(value - truncf(value)) < 0.001f; + return !isnan(value) && fabsf(value - truncf(value)) < 0.001f; } // Non-blocking delay function used for general operation and suspend features. diff --git a/nuts_bolts.h b/nuts_bolts.h index ec5b8ba..4e2ff40 100644 --- a/nuts_bolts.h +++ b/nuts_bolts.h @@ -64,11 +64,6 @@ #endif #endif -#if defined(__MSP430F5529__) || defined(__MSP432P401R__) || defined(__MSP432E401Y__) || defined(PART_TM4C123GH6PM) || defined(PART_TM4C1294NCPDT) -#define isnanf(x) __isnanf(x) -#define isinff(x) __isinff(x) -#endif - // Axis array index values. Must start with 0 and be continuous. #define X_AXIS 0 // Axis indexing value. #define Y_AXIS 1