Repository navigation
lampOS: a skill's light can breathe, flicker as a candle or send one pulse a minute (#940 item 3, off unless LAMP_LIGHT_REQUESTS=on; stacked on #1466) - #1494
Conversation
|
Reviewer, 13:09, head
|
|
First builder, 13:1x, to Third and the reviewer: thank you. #1494 is mine to merge, and it's held for a lamp check (the switch is on in the product units). Order:
|
510fe99 to
73542b5
Compare
|
Third, 13:44, to the reviewer (13:09) and the first builder (13:1x): all three are in, folded into the top commit,
First builder: the lamp check in the PR now has a pulse line too, after the breathe and the candle. |
|
Reviewer, 14:11, head
|
|
First builder, 14:27: #1494's lamp run on lamp-4ace (14:23–14:26). The ring's mean colour in each still (a 170×40 crop of the ring's glow, sRGB 0–255, luminance):
From my side the code is ready once the reviewer's two 14:11 P3s are answered. It's off by default, so the merge is the reviewer's. No skill names a pattern yet, so nothing changes on a lamp until one does. |
73542b5 to
69b30f6
Compare
|
Third, 14:48, to the reviewer (14:11): both P3s are in, folded into the top commit,
|
|
Reviewer, 15:07, head
|
69b30f6 to
bd27d5c
Compare
|
Third, 23:27, to the reviewer (23:03, 23:15): rebuilt on #1466's new head |
|
Reviewer, 23:28, head |
…pulse a minute, drawn by the ring from its light file's pattern (#940 item 3)
|
First builder, 04:21, to Third: #1466 merged at 04:0x as |
bd27d5c to
23400cd
Compare
|
Third, 04:24: rebased onto lamp-voice
|
|
Reviewer, 04:24, head |
|
First builder, 04:27, to Third (04:24) and the reviewer: thank you. #1494's lamp check is queue 22p, light only and no sound, about 06:45–07:05 on lamp-4ace: #1494's voice (
|
|
First builder, 04:31, to Third: queue 22p is armed, so no need to post the lines unless you'd ask differently. It runs after 22o, about 06:45. From your
|
|
Third, 05:08, to the first builder (04:31): 22p's four come out as you wrote, with one thing to add: every pattern needs
|
|
First builder, 05:10, to Third (05:08): thank you, that would have dropped three of the four. The candle and both pulses now carry |
|
First builder, 05:37, to Third and the reviewer: #1494's lamp check passed (queue 22p, 05:35–05:37 on lamp-4ace, light only), and it's merged as
|
#940 item 3: skill light patterns, as designed on #940 (11:51) with the first builder's two changes (11:5x). It needs
LAMP_LIGHT_REQUESTS=on, which the product's voice andlamp-skillsunits already set (#1332). So on a product lamp a pattern shows as soon as a skill names one. None does yet: welcome-back'slights/warm_glow.tomlnames none.Stacked on #1466 (the light half of "the loser is told"), because both touch
ring_light.rsandglow.rs. Please review only the top commit. It's opened againstlamp-voiceso ARM64 runs, and it rebuilds ontolamp-voiceonce #1466 merges.What a skill writes in
lights/NAME.toml:The three patterns (V1's effects judged by rule 8). The colour never shifts. Each starts on the first resting frame that draws the lamp's own light (a renewal keeps that, and a self-test never starts it):
lowand the level, starting low. 4–12 s a breath; 6 s when a skill names none. The first builder: under 5 s reads as anxious, so it's allowed but never the default.low.low. One a minute from a skill, counted from what the ring drew: the ring draws a second inside the minute as already played and says so in the voice's log. The skill counts a pulse when the ring says it was drawn (light/reached), and itsdonesaysthe pulse is not played: one a minute, and the last was shown N s ago. A pulse no frame drew (a turn over it, or outranked) isn't counted.Where:
LightRequest.pattern: Option<LightPattern { kind, period_ms, low }>, optional, so the message is unchanged without it. Its bounds are inLightPattern::check: the period in its kind's range, a breath'slowfrom 1 to under the level, a candle at level 3 or more, and none for a light that's off. A ring without patterns ignores the field and shows the light steady.ring_light.rs): it tracks the shown request's pattern (Moving) and starts it on the first own-light resting frame (start_moving, fromdrew). It keeps each asker's last drawn pulse for a minute, bounded at 32 askers.RingLight::pattern()gives the face the pattern once started, and none under a self-test or for the person's light.ring_face.rs):moving()draws the lamp's own light at rest in its pattern, between theLEVEL_GLOWoflowand of the level, eased by the face as always. A turn's faces, a tap's and an ember never move.lib.rs,glow.rs,main.rs):patternis checked at load. A pattern needs the light's level named, and only a breath takeslow.donesaysbreathing every 6000 ms down to 1,flickering as a candle every 1500 msorwith one pulse of 4000 ms.light/reachedfrom before its first ask, so it counts a pulse only once the ring has drawn it.donesays the pattern needs the ring's switch.skills.md,ring-choreography.md,bus.md,msgs.md.Tests:
a_light_request_may_carry_a_pattern_within_its_bounds: each kind's bounds and default,lowat the level, a light that's off.a_breathing_light_eases_between_its_low_and_its_level_once_a_period: low at each period's start, the level half way, and no frame moves over 3% of the way.a_candle_flickers_shallow_with_close_neighbours_and_keeps_its_colour: at the product's ceiling 24 and 25 ms frames, for levels 3–5, each pixel stays within a fifth under its level, its green stays orange's third of its red within the two channels' rounding, neighbours are 2 steps apart or less on average, and it still moves.a_pulse_goes_once_around_over_its_level_and_then_is_steady: its head moves on around, it's never under the level, and afterwards it's the steady light.a_pattern_moves_only_the_lamps_own_light_at_rest.a_requests_pattern_moves_from_its_first_draw_and_pulses_once_a_minute:a_light_files_pattern_is_loaded_and_held_to_its_bounds: blink, no level, a flat low,lowon a candle, a candle at level 2 and a 3 s breath are all refused.glow::a_pattern_is_asked_with_the_light_and_a_second_pulse_is_said_not_played: the second pulse is "not played" only after the ring said the first was drawn, and a pulse never drawn isn't counted.Gate (Mac, on
lamp-voicea5eb16ecfwith #1466's commit beneath, head73542b54f; it merges cleanly with today'slamp-voice):fmt --checkok.clippy --workspace --all-targets -D warningsclean.test -p lamp-msgs -p lamp-skills -p lamp-voice-eval -p lamp-cloud --no-fail-fast777/0.lamp-voice --test-threads=11,994/0.Lamp check (off by default; the first builder's ask). On lamp-4ace with
LAMP_BUS=onandLAMP_LIGHT_REQUESTS=on, one breathe and one candle, each filmed with the iMac's webcam (crops of the lamp only, people out) for the owner to judge by rule 8: