From 7ad6b53647569791d5393decdde99203f1cb4915 Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Mon, 17 Aug 2026 22:06:22 -0400 Subject: [PATCH] dladder: an absent laser_power_model key now means density The shipped default changed, so the drill's precondition would have refused to run on a stock machine - the one configuration it most needs to be able to test. Only an explicit analog selection is a refusal now, and the drill reports whether the model came from the config or the driver default. --- scripts/bench/live_fire_drills.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/bench/live_fire_drills.py b/scripts/bench/live_fire_drills.py index f0877ca..538327e 100644 --- a/scripts/bench/live_fire_drills.py +++ b/scripts/bench/live_fire_drills.py @@ -599,13 +599,17 @@ def drill_dladder(g): # Preconditions. The model is read at each arm, so it must already be # selected; the floor must be gone, or every rung is lifted off the # bottom of the range this drill exists to explore. - model = conf_get('laser_power_model') + # Density is the shipped default, so an absent key selects it; only an + # explicit analog selection is a refusal. + model = conf_get('laser_power_model') or 'density' if model != 'density': - print('PRECONDITION FAILED: laser_power_model is %r, need "density".' + print('PRECONDITION FAILED: laser_power_model is %r, need "density"' % (model,)) - print('Set it in %s and re-run. The model is read at each arm, so' % CONF) - print('this key needs no controller restart.') + print('(or the key absent, which selects it). The model is read at') + print('each arm, so this key needs no controller restart.') return 2 + print('dose model: density (%s)' + % ('set in ' + CONF if conf_get('laser_power_model') else 'driver default')) # The core maps S onto the level this model renders as density, and # $35/$36 are its floor and ceiling. Read them rather than assuming: # with a floor set, the ladder is testing the shipping mapping, and