refactor: serial params rename + 3-phase throughput test#8
Merged
Conversation
Phase 1 - Parameter Renaming: - chunk_size → upload_chunk_size + download_chunk_size (split) - tx_chunk_size → serial_tx_fragment_size - tx_chunk_delay → serial_tx_fragment_delay (default 2ms) - verify_crc removed (always verify) Phase 2 - 3-Phase Serial Throughput Test: - Phase 1: TX fragment probe (detect if fragmentation needed) - Phase 2: Upload chunk probe (find shell buffer limit) - Phase 3: Download chunk probe via new echoback command Device firmware (fl.c): - Add echoback command: fills send buffer with pattern, returns base64+CRC for download direction testing Frontend: - Simplified test result dialog (confirm with recommended params) - Remove unused i18n keys (current_chunk_size, etc.) All 1941 tests pass, format/lint clean.
- Add cmd_args_t struct to consolidate all parsed arguments - Add cmd_handler_t function pointer type - Change all cmd_* signatures to int cmd_xxx(fl_context_t*, const cmd_args_t*) - Move argument validation into each cmd_* (no more handle_* wrappers) - Replace if-else command dispatch with s_cmd_table[] lookup - Print available commands when --cmd is missing - Add echoback command tests (8 cases) in test_fl.c
- Add verify_crc case to onConfigItemChange dispatch - Add 'Max working size' output to fpbTestSerial results - Update test element IDs: chunkSize -> uploadChunkSize - Fix stale schema key: tx_chunk_delay -> serial_tx_fragment_delay - Align test expectations with current output messages
Replace hardcoded FL_B64_BUF_SIZE=2048 with computed ((FL_BUF_SIZE + 2) / 3 * 4 + 1), saving 679 bytes when FL_BUF_SIZE=1024 (1369 vs 2048).
Add max_retries=3 to _phase_fragment_probe, _phase_upload_probe, and _phase_download_probe. Each test size is retried on failure to reduce false negatives from transient serial errors.
Reduce upload probe max_size from 4096 to 1024 to avoid triggering UART DMA Bus Fault on BES O62 when buffer is near capacity. Signed-off-by: VIFEX <vifextech@foxmail.com>
904be3d to
198db4b
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.
Phase 1 - Parameter Renaming:
Phase 2 - 3-Phase Serial Throughput Test:
Device firmware (fl.c):
Frontend:
All 1941 tests pass, format/lint clean.