1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Merge pull request #7074 from pulquero/telm_config2

Support for enabling individual telemetry sensors
This commit is contained in:
Michael Keller 2018-11-23 01:43:33 +13:00 committed by GitHub
commit 2a748e73d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 112 additions and 39 deletions

View file

@ -304,4 +304,9 @@ extern "C" {
int32_t getMAhDrawn(void) {
return testmAhDrawn;
}
bool telemetryIsSensorEnabled(sensor_e) {
return true;
}
}

View file

@ -309,6 +309,7 @@ serialPortConfig_t *findSerialPortConfig(serialPortFunction_e) {return NULL;}
bool telemetryDetermineEnabledState(portSharing_e) {return true;}
bool telemetryCheckRxPortShared(const serialPortConfig_t *) {return true;}
bool telemetryIsSensorEnabled(sensor_e) {return true;}
portSharing_e determinePortSharing(const serialPortConfig_t *, serialPortFunction_e) {return PORTSHARING_NOT_SHARED;}

View file

@ -255,6 +255,11 @@ bool telemetryDetermineEnabledState(portSharing_e)
return true;
}
bool telemetryIsSensorEnabled(sensor_e sensor) {
UNUSED(sensor);
return true;
}
portSharing_e determinePortSharing(const serialPortConfig_t *, serialPortFunction_e)
{
return PORTSHARING_NOT_SHARED;

View file

@ -184,6 +184,12 @@ bool telemetryDetermineEnabledState(portSharing_e portSharing)
}
bool telemetryIsSensorEnabled(sensor_e sensor) {
UNUSED(sensor);
return true;
}
bool isSerialPortShared(const serialPortConfig_t *portConfig,
uint16_t functionMask,
serialPortFunction_e sharedWithFunction)