Quote Originally Posted by Roxy View Post
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];

OK, done that and tried it oiut.
Nozzle really lifts high now ha..ha..

Here is a printout of what appeared on the screen as it was working.

Printer is now online.
echo:Home X/Y before Z
At end of homeaxis(Z) raising nozzle.
At end of homeaxis(Z) done raising nozzle.
SENDING:G29
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 1.00 y: 1.00 z: 6.92
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 158.00 y: 1.00 z: 4.12
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 158.00 y: 160.00 z: 4.15
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 1.00 y: 160.00 z: 6.53
Eqn coefficients: a: -0.02 b: -0.00 d: 6.84
planeNormal x: 0.02 y: 0.00 z: 1.00
echo:endstops hit: Z:-3.47

I haven't tried a print yet, it is nearly 1.00 am here in Australia, so I am off to the shower and then to bed. Will have another look at it ion the morning (later in the morning)
Thanks for all your effort, much appreciated.