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:
ScottW514
2026-09-16 15:39:20 -04:00
parent 147393322f
commit 9a288b175b
6 changed files with 24 additions and 26 deletions
+6 -6
View File
@@ -145,13 +145,13 @@ def expect_log(log, needle, what):
def case_default():
s = Session()
try:
expect_scale(s, 8, 53.333)
expect_scale(s, 32, 213.333)
rate = s.setting("$110")
check(near(rate, 12000.0), "$110=%.0f stands at x8" % rate,
"$110 is %.3f at x8, want 12000" % rate)
check(near(rate, 12000.0), "$110=%.0f stands at x32" % rate,
"$110 is %.3f at x32, want 12000" % rate)
finally:
log = s.close()
expect_log(log, "x8 microsteps, 28160 Hz machine tick", "no key: x8, the 28160 Hz tick")
expect_log(log, "x32 microsteps, 112640 Hz machine tick", "no key: x32, the 112640 Hz tick")
def case_x16():
@@ -184,11 +184,11 @@ def case_x32():
def case_invalid():
s = Session("xy_microsteps = 24\n")
try:
expect_scale(s, 8, 53.333)
expect_scale(s, 32, 213.333)
finally:
log = s.close()
expect_log(log, "xy_microsteps '24' is not 8, 16 or 32", "a value that is not a mode is refused with a warning")
expect_log(log, "x8 microsteps, 28160 Hz machine tick", "and the machine runs at x8")
expect_log(log, "x32 microsteps, 112640 Hz machine tick", "and the machine runs at x32")
def case_low_tick():