Results 1 to 10 of 89
Threaded View
-
04-29-2014, 08:11 AM #13
Here is the 'right' way to fix that forward reference issue that is keeping it from compiling. It is literally a one line fix.
Make the declaration for run_z_probe() have the forward declaration for do_blocking_move_relative() just in front of it.
Usually there is a header file where this would go, but the best place to put this is just in front of the run_z_probe() function so it stays close to where it is needed. That way all the changes are together if you need to move your changes to a more current code base in the future. This time I actually changed my code to verify it would compile! (and then changed it back)
With these changes the run_z_probe() function knows everything about do_blocking_move() that it needs to know. It knows what type (and how many) parameters it takes and it knows what type (none) of value it returns. The compiler can generate a 'call' to the function even though it doesn't know what the function looks like yet.
#endif // AUTO_BED_LEVELING_GRID
static void do_blocking_move_relative(float , float , float ) ; // New line to fix forward reference issue
static void run_z_probe() {
plan_bed_level_matrix.set_to_identity();
feedrate = homing_feedrate[Z_AXIS];
Last edited by Roxy; 04-29-2014 at 08:32 AM.
Please explain to me how to...
05-17-2024, 12:15 PM in 3D Printer Parts, Filament & Materials