🧑💻 General and Axis-based bitfield flags (#23989)
This commit is contained in:
committed by
Scott Lahteine
parent
d5f472a6cf
commit
d235bc9e1c
@ -44,7 +44,7 @@
|
||||
#include "../../core/debug_out.h"
|
||||
|
||||
static float z_measured[G35_PROBE_COUNT];
|
||||
static bool z_isvalid[G35_PROBE_COUNT];
|
||||
static Flags<G35_PROBE_COUNT> z_isvalid;
|
||||
static uint8_t tram_index = 0;
|
||||
static int8_t reference_index; // = 0
|
||||
|
||||
@ -61,7 +61,10 @@ static bool probe_single_point() {
|
||||
move_to_tramming_wait_pos();
|
||||
|
||||
DEBUG_ECHOLNPGM("probe_single_point(", tram_index, ") = ", z_probed_height, "mm");
|
||||
return (z_isvalid[tram_index] = !isnan(z_probed_height));
|
||||
|
||||
const bool v = !isnan(z_probed_height);
|
||||
z_isvalid.set(tram_index, v);
|
||||
return v;
|
||||
}
|
||||
|
||||
static void _menu_single_probe() {
|
||||
@ -95,7 +98,7 @@ void goto_tramming_wizard() {
|
||||
ui.defer_status_screen();
|
||||
|
||||
// Initialize measured point flags
|
||||
ZERO(z_isvalid);
|
||||
z_isvalid.reset();
|
||||
reference_index = -1;
|
||||
|
||||
// Inject G28, wait for homing to complete,
|
||||
|
Reference in New Issue
Block a user