mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Smartport not working without USE_ESC_SENSOR
This commit is contained in:
parent
b5521b927d
commit
1f04d74b62
1 changed files with 2 additions and 4 deletions
|
@ -495,11 +495,7 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
|
||||||
|
|
||||||
static uint8_t smartPortIdCycleCnt = 0;
|
static uint8_t smartPortIdCycleCnt = 0;
|
||||||
if (smartPortIdCycleCnt % SENSOR_REST_PERIOD == 0) {
|
if (smartPortIdCycleCnt % SENSOR_REST_PERIOD == 0) {
|
||||||
#ifdef USE_ESC_SENSOR
|
|
||||||
smartPortIdCycleCnt++;
|
smartPortIdCycleCnt++;
|
||||||
#else
|
|
||||||
smartPortIdCycleCnt = 0;
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,9 +516,11 @@ void processSmartPortTelemetry(smartPortPayload_t *payload, volatile bool *clear
|
||||||
if (smartPortIdCycleCnt < ESC_SENSOR_PERIOD) {
|
if (smartPortIdCycleCnt < ESC_SENSOR_PERIOD) {
|
||||||
// send other sensors
|
// send other sensors
|
||||||
tableInfo = &frSkyDataIdTableInfo;
|
tableInfo = &frSkyDataIdTableInfo;
|
||||||
|
#endif
|
||||||
if (tableInfo->index == tableInfo->size) { // end of table reached, loop back
|
if (tableInfo->index == tableInfo->size) { // end of table reached, loop back
|
||||||
tableInfo->index = 0;
|
tableInfo->index = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef USE_ESC_SENSOR
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
uint16_t id = tableInfo->table[tableInfo->index];
|
uint16_t id = tableInfo->table[tableInfo->index];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue