HF functionality extraction and Seader hardening - #36
Merged
Merged
Conversation
👷 Deploy request for seader pending review.Visit the deploys page to approve it
|
bettse
reviewed
Mar 24, 2026
bettse
left a comment
Owner
There was a problem hiding this comment.
wont' be able to look till this evening, so I wanted to drop a few notes
|
|
||
| bool seader_apdu_runner_send_next_line(Seader* seader) { | ||
| SeaderWorker* seader_worker = seader->worker; | ||
| if(!seader_worker || !seader_worker->uart) { |
| @@ -0,0 +1,172 @@ | |||
| # Ownership Model | |||
Owner
There was a problem hiding this comment.
what if this was it's own PR? Given it is english, feels like an easy win
| @@ -0,0 +1,191 @@ | |||
| --- | |||
Owner
There was a problem hiding this comment.
should just be handled ufbt format? or is this the same?
| static bool plugin_hf_start_read_for_type(void* plugin_ctx, SeaderCredentialType type) { | ||
| PluginHfContext* ctx = plugin_ctx; | ||
| NfcPoller* poller_detect = NULL; | ||
| if(!ctx || !ctx->nfc || !ctx->api) { |
cindersocket
commented
Mar 25, 2026
| #define SEADER_APDU_MAX_LEN 732 | ||
|
|
||
| void seader_apdu_runner_cleanup(Seader* seader, SeaderWorkerEvent event) { | ||
| furi_check(seader); |
Collaborator
Author
There was a problem hiding this comment.
This one should not be recoverable.
cindersocket
force-pushed
the
feat-snmp
branch
2 times, most recently
from
March 25, 2026 02:06
d828af3 to
c6301b5
Compare
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
This PR hardens Seader’s HF/UHF runtime lifecycle by making ownership explicit and enforcing it in
code. It removes teardown-time use of shared Flipper NFC objects, makes HF and wiegand in-repo plugins, and adds an ownership contract so future changes have a single source of truth.
What changed
state
Why
There were several potential ways for this app to fail:
This PR makes invalid states much harder to represent by construction.
Contract / invariants
After this change:
Validation