Repository navigation
I2C asyn calling -- CORE - #12133
I2C asyn calling -- CORE#12133error414 wants to merge 23 commits into
Conversation
SBUS servo output is resolved with findSerialPortConfig(), which returns the first port that carries FUNCTION_SERVO_SERIAL. Assigning the function to a second port was accepted and reported back by the serial command, but that port was never opened. Reject such an assignment in the CLI instead of ignoring it silently. Fixes iNavFlight#11430
The mixer switch carry over loop ended at the first INPUT_MIXER_SWITCH_HELPER rule. Switching a mixer profile back before the carry over of the previous switch had decayed therefore dropped its remaining filter state, the newly loaded rule restarted from zero and the servo jumped towards its mid position. Only the carry capacity ends the loop now, helper rules are carried over like any other speed limited rule. Fixes iNavFlight#11503
The constraints list already covers the analogous telemetry rule. Adds the SERVO_SERIAL case, including that the second assignment used to be accepted silently without the port ever being opened.
Rename serialDuplicatedSinglePortFunctions() to serialGetDuplicatedSinglePortFunctions() so the helper has a verb name like the other serialGet*/serialFind* functions (Development.md iNavFlight#5). Cut the three-line comment above SERIAL_SINGLE_PORT_FUNCTIONS to one line that states why the list exists. docs/Serial.md: drop the "previously it was accepted" history from the constraint and say what happens to a saved configuration that already has SBUS output on several ports: only the first port in the serial list is used, the configuration is not reset. No functional change.
Development.md asks for comments that explain why, not what. No functional change.
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoAdd non-blocking I2C transfers for barometers and compasses
AI Description
Diagram
High-Level Assessment
Files changed (28)
|
Code Review by Qodo
1.
|
|
RAM / Flash usage vs. base commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #12133 251 targets built. Find your board's
|
…cond-uart Refuse assigning SBUS output to a second serial port
…ed-carryover Keep the servo speed carry over when switching mixer profiles back
…iting to start transfer
|
Tested on:
It takes more flash + RAM because this PR just add async for I2C for some devices. There are another PRs for rewriting rest of devices. |
|
Reduce memory for F7 CPUs, replace HAL to direct registry access. Idea and ispiration taken from #12157 |
this PR is first step for #12100 rewiting I2C from sync calling to async calling.
Why:
Sync calling takes much time and CPU does not do nothing, just waiting to response. For 16bit register 200khz i2c it takes 200us. For OLED display CPU can wait up to 10ms!!!
How:
In this PR is core of async functions for all CPUs and rewritten drivers
To be possible to test all scenarios, like two devices on same bus, Two devide on same bus, one disconect, etc......
Need to be tested
Platforms:
Device:
Related PRs: