hilink: retry MSP VTX table after FC handshake
This commit is contained in:
@@ -1,12 +1,28 @@
|
|||||||
diff --git a/osd.c b/osd.c
|
diff --git a/osd.c b/osd.c
|
||||||
index a8b756e..eefb4d6 100644
|
index a8b756e..701e989 100644
|
||||||
--- a/osd.c
|
--- a/osd.c
|
||||||
+++ b/osd.c
|
+++ b/osd.c
|
||||||
@@ -960,48 +960,16 @@ static void rx_msp_callback(msp_msg_t *msp_message) {
|
@@ -190,6 +190,7 @@ extern bool vtxMenuActive;
|
||||||
|
extern bool vtxMenuEnabled;
|
||||||
|
extern bool armed;
|
||||||
|
extern bool vtxInitDone;
|
||||||
|
+static bool mspVtxTableResentAfterFcTraffic;
|
||||||
|
extern bool DrawOSD;
|
||||||
|
|
||||||
|
// SRT/OSD
|
||||||
|
@@ -960,48 +961,24 @@ static void rx_msp_callback(msp_msg_t *msp_message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case MSP_GET_VTX_CONFIG: {
|
case MSP_GET_VTX_CONFIG: {
|
||||||
- if (vtxInitDone) {
|
- if (vtxInitDone) {
|
||||||
|
+ // The FC starts publishing its VTX state only after its MSP descriptor is
|
||||||
|
+ // active. Re-send our table once at that boundary: the boot-time burst can
|
||||||
|
+ // otherwise precede FC UART/MSP initialization.
|
||||||
|
+ if (vtxInitDone && !mspVtxTableResentAfterFcTraffic) {
|
||||||
|
+ msp_set_vtx_config(serial_fd);
|
||||||
|
+ mspVtxTableResentAfterFcTraffic = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ if (vtxInitDone && verbose) {
|
+ if (vtxInitDone && verbose) {
|
||||||
mspVtxConfigStruct *in_mspVtxConfigStruct = (mspVtxConfigStruct *)msp_message->payload;
|
mspVtxConfigStruct *in_mspVtxConfigStruct = (mspVtxConfigStruct *)msp_message->payload;
|
||||||
- uint16_t frequency =
|
- uint16_t frequency =
|
||||||
|
|||||||
Reference in New Issue
Block a user