Close



Results 1 to 10 of 89

Threaded View

  1. #13
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •