1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Smartport not working without USE_ESC_SENSOR

This commit is contained in:
jirif 2018-05-17 18:24:43 +02:00
parent b5521b927d
commit 1f04d74b62

View file

@ -495,11 +495,7 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
static uint8_t smartPortIdCycleCnt = 0;
if (smartPortIdCycleCnt % SENSOR_REST_PERIOD == 0) {
#ifdef USE_ESC_SENSOR
smartPortIdCycleCnt++;
#else
smartPortIdCycleCnt = 0;
#endif
return;
}
@ -520,9 +516,11 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
if (smartPortIdCycleCnt < ESC_SENSOR_PERIOD) {
// send other sensors
tableInfo = &frSkyDataIdTableInfo;
#endif
if (tableInfo->index == tableInfo->size) { // end of table reached, loop back
tableInfo->index = 0;
}
#ifdef USE_ESC_SENSOR
}
#endif
uint16_t id = tableInfo->table[tableInfo->index];