fix(crossfire): handle partial frame from half-duplex IDLE split (#7242)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c51728154b
commit
29170d20c5
@@ -262,9 +262,9 @@ static void pxx1SportSensorPolling(void* param)
|
||||
if (outputTelemetryBuffer.destination != TELEMETRY_ENDPOINT_SPORT)
|
||||
return;
|
||||
|
||||
auto mod_st = (etx_module_state_t*)param;
|
||||
auto drv = modulePortGetSerialDrv(mod_st->rx);
|
||||
auto ctx = modulePortGetCtx(mod_st->rx);
|
||||
auto mod_rx = (etx_module_driver_t*)param;
|
||||
auto drv = modulePortGetSerialDrv(*mod_rx);
|
||||
auto ctx = modulePortGetCtx(*mod_rx);
|
||||
|
||||
// Match sensor polling from the module
|
||||
// -> detect <0x7E [Physical ID]> as the last sequence
|
||||
@@ -341,7 +341,7 @@ static void* pxx1Init(uint8_t module)
|
||||
auto drv = modulePortGetSerialDrv(mod_st->rx);
|
||||
auto ctx = modulePortGetCtx(mod_st->rx);
|
||||
if (drv && ctx && drv->setIdleCb) {
|
||||
drv->setIdleCb(ctx, pxx1SportSensorPolling, mod_st);
|
||||
drv->setIdleCb(ctx, pxx1SportSensorPolling, &mod_st->rx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user