Merge pull request #5912 from jirif/smartport_without_esc_telemetry

Smartport not working without USE_ESC_SENSOR
This commit is contained in:
Michael Keller 2018-05-20 00:30:55 +12:00 committed by GitHub
commit 0b40e1c673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

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];