Merge pull request #7438 from mikeller/fix_ledstrip_unit_tests

Fixed unit tests using 'ledstrip.c'.
This commit is contained in:
Michael Keller 2019-01-22 18:10:56 +13:00 committed by GitHub
commit f097df6fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -286,7 +286,7 @@ void init(void)
targetPreInit();
#endif
#if !defined(UNIT_TEST) && !defined(USE_FAKE_LED)
#if !defined(USE_FAKE_LED)
ledInit(statusLedConfig());
#endif
LED2_ON;

View File

@ -679,11 +679,9 @@ static uint8_t applySelectAdjustment(adjustmentFunction_e adjustmentFunction, ui
break;
case ADJUSTMENT_LED_PROFILE:
#ifdef USE_LED_STRIP
#ifndef UNIT_TEST
if (getLedProfile() != position) {
setLedProfile(position);
}
#endif
#endif
break;

View File

@ -739,9 +739,11 @@ PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 2);
void resetArmingDisabled(void) {}
timeDelta_t getTaskDeltaTime(cfTaskId_e) { return 20000; }
}
armingDisableFlags_e getArmingDisableFlags(void) {
return (armingDisableFlags_e) 0;
}
bool isTryingToArm(void) { return false; }
void resetTryingToArm(void) {}
void setLedProfile(uint8_t profile) { UNUSED(profile); }
uint8_t getLedProfile(void) { return 0; }
}