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:
commit
933fb0b6b4
|
@ -30,6 +30,7 @@ uint8_t debugMode;
|
|||
uint32_t sectionTimes[2][4];
|
||||
#endif
|
||||
|
||||
// Please ensure that these names are aligned with the enum values defined in 'debug.h'
|
||||
const char * const debugModeNames[DEBUG_COUNT] = {
|
||||
"NONE",
|
||||
"CYCLETIME",
|
||||
|
@ -78,7 +79,7 @@ const char * const debugModeNames[DEBUG_COUNT] = {
|
|||
"ANTI_GRAVITY",
|
||||
"DYN_LPF",
|
||||
"RX_SPEKTRUM_SPI",
|
||||
"DSHOT_TELEMETRY",
|
||||
"DSHOT_RPM_TELEMETRY",
|
||||
"RPM_FILTER",
|
||||
"D_CUT",
|
||||
};
|
||||
|
|
|
@ -84,7 +84,7 @@ typedef enum {
|
|||
DEBUG_ADC_INTERNAL,
|
||||
DEBUG_RUNAWAY_TAKEOFF,
|
||||
DEBUG_SDIO,
|
||||
DEBUG_CURRENT,
|
||||
DEBUG_CURRENT_SENSOR,
|
||||
DEBUG_USB,
|
||||
DEBUG_SMARTAUDIO,
|
||||
DEBUG_RTH,
|
||||
|
@ -96,7 +96,7 @@ typedef enum {
|
|||
DEBUG_ANTI_GRAVITY,
|
||||
DEBUG_DYN_LPF,
|
||||
DEBUG_RX_SPEKTRUM_SPI,
|
||||
DEBUG_RPM_TELEMETRY,
|
||||
DEBUG_DSHOT_RPM_TELEMETRY,
|
||||
DEBUG_RPM_FILTER,
|
||||
DEBUG_D_CUT,
|
||||
DEBUG_COUNT
|
||||
|
|
|
@ -267,7 +267,7 @@ void pwmStartDshotMotorUpdate(uint8_t motorCount)
|
|||
if (value != 0xffff) {
|
||||
dmaMotors[i].dshotTelemetryValue = value;
|
||||
if (i < 4) {
|
||||
DEBUG_SET(DEBUG_RPM_TELEMETRY, i, value);
|
||||
DEBUG_SET(DEBUG_DSHOT_RPM_TELEMETRY, i, value);
|
||||
}
|
||||
} else {
|
||||
dshotInvalidPacketCount++;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue