mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 16:51:12 -07:00
Track the x32 xy_microsteps default in forgetest and the bench tools
Acceptance baseline: XY_MODE_DEFAULT 8 -> 32, split out XY_MODE_BASE (8) for the tick/ramp scaling, matching the driver. The mode-aware comparisons (fixed_sysfs of the resolved mode) judge an unset machine at x32. Host CI: xy_mode_test.py default and invalid cases expect x32/213.333/112640. Bench tools: raster_dry.py and xy_pattern_accel.py set_mode() cleared the key for mode 8, which relied on clear == the x8 default; clearing now yields x32, so they set the mode explicitly and restore to x32. live_fire_drills STREAM_RATE_HZ is the 28160 Hz laser reference tick, the same at every mode.
This commit is contained in:
@@ -23,7 +23,7 @@ through the pattern. Reports, per leg and overall, the cruise-window
|
||||
RMS and peak-to-peak of X and Y with the mean removed, the leg times,
|
||||
the kernel counters against home, and cnc/underruns; JSON with the raw
|
||||
trace to the bench data directory. Releases the hold and puts the
|
||||
accelerometer back on every exit path. Ends at x8.
|
||||
accelerometer back on every exit path. Ends at x32.
|
||||
|
||||
Needs the controller in GRBL mode, homed and standing at home, the lid
|
||||
closed, no other Grbl client, and the bed clear across the pattern.
|
||||
@@ -156,10 +156,7 @@ def fail(msg):
|
||||
|
||||
|
||||
def set_mode(mode):
|
||||
if mode == 8:
|
||||
st, body = forgectrl_post("/settings", params={"xy_microsteps": ""})
|
||||
else:
|
||||
st, body = forgectrl_post("/settings", data={"xy_microsteps": str(mode)})
|
||||
st, body = forgectrl_post("/settings", data={"xy_microsteps": str(mode)})
|
||||
if st != 200:
|
||||
fail("settings write refused: %s %s" % (st, body))
|
||||
time.sleep(3)
|
||||
@@ -397,9 +394,9 @@ def main():
|
||||
json.dump(rec, f)
|
||||
print(" record: %s" % path)
|
||||
results.append(rec)
|
||||
if modes[-1] != 8:
|
||||
print("=== restore x8 ===")
|
||||
set_mode(8)
|
||||
if modes[-1] != 32:
|
||||
print("=== restore x32 ===")
|
||||
set_mode(32)
|
||||
print("\n=== summary (cruise RMS with the mean removed, raw counts; CTRL4 0x%02x) ==="
|
||||
% results[0].get("ctrl4", 0))
|
||||
print("%-6s %10s %10s %10s %10s %8s" % ("mode", "x rms", "x p2p", "y rms", "y p2p", "result"))
|
||||
|
||||
Reference in New Issue
Block a user