Closed hydra closed 1 month ago
Note, both issues are still present on master
with https://github.com/betaflight/betaflight/pull/13565 applied.
there's also this:
"SOFTSERIAL_TX",
"SOFTSERIAL_RX",
[OWNER_LPUART_TX] = "LPUART_TX",
[OWNER_LPUART_RX] = "LPUART_RX",
};
which doesn't match any of the previous lines of code. from 90841282b03339c7361db306d280f4bdd96de1e4 / #13306
I note that changing this:
"SOFTSERIAL_TX",
"SOFTSERIAL_RX",
[OWNER_LPUART_TX] = "LPUART_TX",
[OWNER_LPUART_RX] = "LPUART_RX",
};
to this:
"SOFTSERIAL_TX",
"SOFTSERIAL_RX",
"LPUART_TX",
"LPUART_RX",
};
fixes the second issue.
# resource LPUART_RX 1 B07
Resource is set to B07
@ledvinap / @haslinghuis your suggestion here https://github.com/betaflight/betaflight/pull/13306#discussion_r1502901863 didn't do what you expected.
With #13565 and #13568 applied the assignment of serial/lpuarts is still coupled, as follows:
# resource LPUART_RX 1 B07
Resource is set to B07
# resource
resource SERIAL_TX 1 A09
resource SERIAL_RX 1 A10
resource LPUART_TX 1 A10
resource LPUART_RX 1 B07
# ^^^ note duplication of assignment on A10.
# resource LPUART_TX 1 NONE
Resource is freed
# resource
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 D05
resource SERIAL_TX 3 D08
resource SERIAL_TX 4 B09
resource SERIAL_TX 8 E01
# ... <-- NO SERIAL_RX 1!
resource SERIAL_RX 2 D06
resource LPUART_RX 1 B07
# resource SERIAL_RX 1 A10
NOTE: A10 already assigned to LPUART_TX 1.
Resource is set to A10
# resource
resource SERIAL_TX 1 A09
resource SERIAL_RX 1 A10
resource LPUART_TX 1 A10
resource LPUART_RX 1 B07
# ^^^ note both SERIAL_RX and LPUART_TX were configured!
there's also this:
"SOFTSERIAL_TX", "SOFTSERIAL_RX", [OWNER_LPUART_TX] = "LPUART_TX", [OWNER_LPUART_RX] = "LPUART_RX", };
which doesn't match any of the previous lines of code. from 9084128 / #13306
This part is IMO correct. Item order match and gcc is quite strict to prevent mismatch.
This part is IMO correct. Item order match and gcc is quite strict to prevent mismatch.
Can you explain why making the single change in https://github.com/betaflight/betaflight/issues/13567#issuecomment-2068693404 fixes the 'Invalid resource name LPUART_RX' issue?
@hydra : I don't know. But at least in master, [OWNER_LPUART_TX] = "LPUART_TX",
ends up exactly in the same place as "LPUART_TX"
Remove it if you want, all entries shall be prefixed anyway
@hydra : I don't know. But at least in master,
[OWNER_LPUART_TX] = "LPUART_TX",
ends up exactly in the same place as"LPUART_TX"
Remove it if you want, all entries shall be prefixed anyway
compiler bug perhaps?
@hydra : I started deep cut into serial mess, so I'll look into this later.
Describe the bug
It's not possible to configure LPUART pins using the cli
resource
command.There are two issues.
To Reproduce
Expected behavior
working LPUART pin configuration. e.g.
resource LPUART_RX 1 B07
.Support ID
Flight controller
SPRacingH7NEO
Other components
No response
How are the different components wired up (including port information)
No response
Add any other context about the problem that you think might be relevant here
Notes from discord: