-
Notifications
You must be signed in to change notification settings - Fork 9
Add GRID_MUX_UNUSED macro and improve module mux handling #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
SukuWc
wants to merge
10
commits into
master
Choose a base branch
from
SUKU-module-mux-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Add GRID_MUX_UNUSED macro to grid_ain.h for cross-platform use - Rename mux_position to element_index for clarity - Add bounds asserts before array access - Add if-guards for unused mux indices where needed - Replace magic numbers with defines - Fix EF44 invalid lookup entries (10,8,11,9 -> unused) Modules updated: EF44, PBF4, TEK1, TEK2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mux_overflow count with mux_positions_bm bitmask to support non-contiguous mux positions (e.g., PBF4 skips positions 4-5) - Add GRID_MUX_FIRST_VALID and GRID_MUX_INCREMENT macros for shared mux index manipulation between ESP32 and ULP - ULP now skips invalid mux positions, improving efficiency on Rev H - Update all module init calls to use binary bitmask notation - PBF4/TEK2: replace if-guard with assert since invalid positions are now skipped at driver level Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GRID_AIN_INTERNAL_RESOLUTION, GRID_ADC_MAX, GRID_ADC_INVERT macros - Add GRID_POTMETER_DEADZONE, GRID_POTMETER_CENTER platform constants - Move GRID_MUX_* macros from grid_esp32_pins.h to grid_ain.h (shared) - Refactor D51 BU16/PO16/PBF4 to use for loop and interleaved lookup tables - Normalize D51 BU16 to 12-bit internal resolution (was 16-bit) - Add invert_result_lookup tables for consistent polarity handling - Add grid_common dependency to grid_esp32_adc for ULP build Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… data flow - Add GRID_ADC_DOWNSAMPLE and GRID_ADC_INVERT_COND macros to grid_ain.h - Convert all D51 modules to use 2D mux_element_lookup[channel][mux_position] - Use element_invert_bm bitmask for constant-time conditional inversion - Standardize callback data flow: raw -> inverted -> downsampled - Move adcs array to global scope with correct MUX->ADC mapping - Rename loop iterator to 'channel' for clarity Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…flow - Convert to 2D mux_element_lookup[channel][mux_state] - Use element_invert_bm bitmask with GRID_ADC_INVERT_COND macro - Standardize signal flow: raw -> inverted -> downsampled -> ASC -> store - Use GRID_AIN_INTERNAL_RESOLUTION instead of hardcoded 12 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…stent signal flow Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ent index - Add ASC pass-through (factor=1) to D51 module drivers for cross-platform consistency - Refactor grid_asc_process signature to take array and index separately - Change ASC indexing from ADC position to element_index across all modules - Adjust array sizes to match element counts (PBF4: 12, EF44: 8) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change first param from grid_ui_element* to grid_ui_model* - Add element_index param to derive element internally - Add assertions for ui pointer and bounds checking - Rename input_channel to element_index for clarity - Update all call sites across D51 and ESP32 modules Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Modules updated: EF44, PBF4, TEK1, TEK2