Repository navigation
feat: birdnet-go, mqtt-notifications, on-air, pomodoro-timer ask for the screen in-process - #624
Merged
Merged
Conversation
…the screen in-process Core #768 added BasePlugin.request_on_demand() / end_on_demand(). These four plugins wrote the display_on_demand_request mailbox, which the display reads once a second while its control socket is up and which a future core removes. They now use the API where the core has it (hasattr), so a request lands within a frame, and write the mailbox when the method is missing (cores up to 3.8.0) or answers None (no display in the process), or raises. On-air's OFF and pomodoro's release end only the plugin's own session on new cores. ledmatrix_min_version is unchanged: the fallback keeps older cores working. - birdnet-go 1.2.9, mqtt-notifications 1.2.9, on-air 1.2.15, pomodoro-timer 1.3.11 (versions[] entries; plugins.json regenerated) - tests: birdnet-go and on-air test_on_demand_api.py, mqtt-notifications test_on_demand_trigger.py and pomodoro-timer test_pomodoro_timer.py cover both paths; the API half skips on a core without it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 43 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core ChuckBuilds/LEDMatrix#768 (merged, 0577c807) added
BasePlugin.request_on_demand(mode=None, duration=None, pinned=False)andend_on_demand(). They are safe from any thread and reach the display within a frame. These four plugins wrote thedisplay_on_demand_requestmailbox instead, which the display reads only once a second while its control socket is up and which a future core removes (coredocs/IPC_CONTROL_SOCKET.md, stage 5).Each plugin now:
hasattr(self, "request_on_demand")/hasattr(self, "end_on_demand")holds;None(no display in the process, or a full queue), or raises._trigger_on_demand(detection interrupt)_trigger_on_demand_display. A duration the core refuses (a string from the JSON) keeps the mailbox path, which parses it as before_trigger_displayON / OFF_sync_pin, pin and release; still understate_lock, since both calls only queueOn new cores, on-air's OFF and pomodoro's release end only the plugin's own on-demand session. A mailbox stop ended any session, including one the user had started for another plugin.
ledmatrix_min_versionis unchanged (the fallback keeps older cores working). The core APIs used are guarded byhasattrin anif, so noAPI_FIRST_VERSIONrow is needed. ANonerow isn't possible yet anyway: core main still reports 3.8.0, which is tagged, soUNTAGGED_SATISFIED_BYcan't be satisfied. Core gained nosrc/module, soMODULE_FIRST_VERSIONis unchanged, and no sports mixins moved.Tests
plugins/birdnet-go/test_on_demand_api.pyandplugins/on-air/test_on_demand_api.py. Extendedmqtt-notifications/test_on_demand_trigger.pyandpomodoro-timer/test_pomodoro_timer.py.PluginManager: no mailbox write, the request reaches the handler, and a refused or raising call falls back. The API half printsSKIP-PARTon a core without it.run_plugin_tests.pyfor the four plugins: 8 passed against core main before #768 and against a fresh core main clone after it (0577c807).scripts/test_*.py(47) passes withLEDMATRIX_COREset to that fresh clone.check_plugin.pysafety harness: all four exit 0;check_version_bump.py --base origin/main birdnet-go mqtt-notifications on-air pomodoro-timer: 4 PASS;update_registry.py --check: PASS;check_manifest_version_fields,check_manifests_ascii,check_core_api_signatures,check_min_core_version,check_module_collisions: all pass.🤖 Generated with Claude Code