mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 01:05:10 +03:00
crossfire computes its own estimate of a safe delay
This commit is contained in:
parent
a4ac99252b
commit
e08fe8e3ad
3 changed files with 7 additions and 6 deletions
|
@ -191,8 +191,8 @@ void processCrossfireTelemetryFrame()
|
|||
update_interval /= 10;
|
||||
offset /= 10;
|
||||
|
||||
serialPrint("[XF] Rate: %d, Lag: %d", update_interval, offset);
|
||||
getModuleSyncStatus(EXTERNAL_MODULE).update(update_interval, offset);
|
||||
TRACE("[XF] Rate: %d, Lag: %d", update_interval, offset);
|
||||
getModuleSyncStatus(EXTERNAL_MODULE).update(update_interval, offset + SAFE_SYNC_LAG);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -338,10 +338,6 @@ OutputTelemetryBuffer outputTelemetryBuffer __DMA;
|
|||
Fifo<uint8_t, LUA_TELEMETRY_INPUT_FIFO_SIZE> * luaInputTelemetryFifo = NULL;
|
||||
#endif
|
||||
|
||||
#define MIN_REFRESH_RATE 4000 /* us */
|
||||
#define MAX_REFRESH_RATE 25000 /* us */
|
||||
#define SAFE_SYNC_LAG 800 /* us */
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
|
||||
static ModuleSyncStatus moduleSyncStatus[NUM_MODULES];
|
||||
|
|
|
@ -258,6 +258,11 @@ extern Fifo<uint8_t, LUA_TELEMETRY_INPUT_FIFO_SIZE> * luaInputTelemetryFifo;
|
|||
void processPXX2Frame(uint8_t module, const uint8_t *frame);
|
||||
|
||||
// Module pulse synchronization
|
||||
|
||||
#define MIN_REFRESH_RATE 4000 /* us */
|
||||
#define MAX_REFRESH_RATE 25000 /* us */
|
||||
#define SAFE_SYNC_LAG 800 /* us */
|
||||
|
||||
struct ModuleSyncStatus
|
||||
{
|
||||
// feedback input: last received values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue