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

Merge pull request #7475 from mikeller/fix_debug_names

Aligned debug mode names with debug enum value names for more fun when debugging.
This commit is contained in:
Michael Keller 2019-01-28 20:16:11 +13:00 committed by GitHub
commit 933fb0b6b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View file

@ -118,8 +118,8 @@ static int32_t currentMeterADCToCentiamps(const uint16_t src)
// y=x/m+b m is scale in (mV/10A) and b is offset in (mA)
int32_t centiAmps = (millivolts * 10000 / (int32_t)config->scale + (int32_t)config->offset) / 10;
DEBUG_SET(DEBUG_CURRENT, 0, millivolts);
DEBUG_SET(DEBUG_CURRENT, 1, centiAmps);
DEBUG_SET(DEBUG_CURRENT_SENSOR, 0, millivolts);
DEBUG_SET(DEBUG_CURRENT_SENSOR, 1, centiAmps);
return centiAmps; // Returns Centiamps to maintain compatability with the rest of the code
}
@ -167,8 +167,8 @@ void currentMeterADCRead(currentMeter_t *meter)
meter->amperage = currentMeterADCState.amperage;
meter->mAhDrawn = currentMeterADCState.mahDrawnState.mAhDrawn;
DEBUG_SET(DEBUG_CURRENT, 2, meter->amperageLatest);
DEBUG_SET(DEBUG_CURRENT, 3, meter->mAhDrawn);
DEBUG_SET(DEBUG_CURRENT_SENSOR, 2, meter->amperageLatest);
DEBUG_SET(DEBUG_CURRENT_SENSOR, 3, meter->mAhDrawn);
}
//