dead code, warnings (#2461)

This commit is contained in:
Matthew Kennedy 2021-03-15 07:23:19 -07:00 committed by GitHub
parent a9c8b39dac
commit 3072d54717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 12 additions and 14 deletions

View File

@ -58,6 +58,7 @@ expected<angle_t> VvtController::getSetpoint() const {
expected<percent_t> VvtController::getOpenLoop(angle_t target) const { expected<percent_t> VvtController::getOpenLoop(angle_t target) const {
// TODO: could we do VVT open loop? // TODO: could we do VVT open loop?
UNUSED(target);
return 0; return 0;
} }

View File

@ -326,7 +326,7 @@ void Engine::updateSwitchInputs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif // EFI_GPIO_HARDWARE #endif // EFI_GPIO_HARDWARE
} }
void Engine::onTriggerSignalEvent(efitick_t nowNt) { void Engine::onTriggerSignalEvent() {
isSpinning = true; isSpinning = true;
} }

View File

@ -316,7 +316,7 @@ public:
/** /**
* this is invoked each time we register a trigger tooth signal * this is invoked each time we register a trigger tooth signal
*/ */
void onTriggerSignalEvent(efitick_t nowNt); void onTriggerSignalEvent();
EngineState engineState; EngineState engineState;
SensorsState sensors; SensorsState sensors;
efitick_t mainRelayBenchStartNt = 0; efitick_t mainRelayBenchStartNt = 0;

View File

@ -322,6 +322,7 @@ static char rpmBuffer[_MAX_FILLER];
* digital sniffer. * digital sniffer.
*/ */
static void onTdcCallback(Engine *engine) { static void onTdcCallback(Engine *engine) {
UNUSED(engine);
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
if (!engine->needTdcCallback) { if (!engine->needTdcCallback) {
return; return;

View File

@ -48,7 +48,7 @@ void RpmCalculator::showInfo(Logging* logger, const char* /*sensorName*/) const
} }
void Lps25Sensor::showInfo(Logging* logger, const char* sensorName) const { void Lps25Sensor::showInfo(Logging* logger, const char* sensorName) const {
// TODO scheduleMsg(logger, "%s: LPS25 baro %.2f kPa", sensorName, get().Value);
} }
void LinearFunc::showInfo(Logging* logger, float testRawValue) const { void LinearFunc::showInfo(Logging* logger, float testRawValue) const {

View File

@ -468,7 +468,7 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
} }
} }
engine->onTriggerSignalEvent(timestamp); engine->onTriggerSignalEvent();
m_lastEventTimer.reset(timestamp); m_lastEventTimer.reset(timestamp);

View File

@ -83,10 +83,6 @@ static float pwmSwitchTimesBuffer[PWM_PHASE_MAX_COUNT];
PwmConfig triggerSignal(pwmSwitchTimesBuffer, sr); PwmConfig triggerSignal(pwmSwitchTimesBuffer, sr);
#define DO_NOT_STOP 999999999
static int stopEmulationAtIndex = DO_NOT_STOP;
static Logging *logger; static Logging *logger;
static int atTriggerVersion = 0; static int atTriggerVersion = 0;

View File

@ -375,7 +375,7 @@ static void setAdcDebugReporting(int value) {
scheduleMsg(&logger, "adcDebug=%d", adcDebugReporting); scheduleMsg(&logger, "adcDebug=%d", adcDebugReporting);
} }
void waitForSlowAdc(int lastAdcCounter) { void waitForSlowAdc(uint32_t lastAdcCounter) {
// we use slowAdcCounter instead of slowAdc.conversionCount because we need ADC_COMPLETE state // we use slowAdcCounter instead of slowAdc.conversionCount because we need ADC_COMPLETE state
// todo: use sync.objects? // todo: use sync.objects?
while (slowAdcCounter <= lastAdcCounter) { while (slowAdcCounter <= lastAdcCounter) {

View File

@ -43,7 +43,7 @@ adc_channel_e getAdcChannel(brain_pin_e pin);
brain_pin_e getAdcChannelBrainPin(const char *msg, adc_channel_e hwChannel); brain_pin_e getAdcChannelBrainPin(const char *msg, adc_channel_e hwChannel);
// wait until at least 1 slowADC sampling is complete // wait until at least 1 slowADC sampling is complete
void waitForSlowAdc(int lastAdcCounter = 0); void waitForSlowAdc(uint32_t lastAdcCounter = 0);
// get a number of completed slowADC samples // get a number of completed slowADC samples
int getSlowAdcCounter(); int getSlowAdcCounter();

View File

@ -51,11 +51,11 @@ static bool disconnect(void* instance) {
return HAL_SUCCESS; return HAL_SUCCESS;
} }
static bool read(void* instance, uint32_t startblk, uint8_t* buffer, uint32_t n) { static bool read(void* instance, uint32_t startblk, uint8_t* buffer, uint32_t /*n*/) {
CompressedBlockDevice* cbd = reinterpret_cast<CompressedBlockDevice*>(instance); CompressedBlockDevice* cbd = reinterpret_cast<CompressedBlockDevice*>(instance);
// If we just initialized, or trying to seek backwards, (re)initialize the decompressor // If we just initialized, or trying to seek backwards, (re)initialize the decompressor
if (cbd->lastBlock == -1 || startblk <= cbd->lastBlock) { if (cbd->lastBlock == -1 || (int32_t)startblk <= cbd->lastBlock) {
uzlib_uncompress_init(&cbd->d, cbd->dictionary, sizeof(cbd->dictionary)); uzlib_uncompress_init(&cbd->d, cbd->dictionary, sizeof(cbd->dictionary));
cbd->d.source = cbd->source; cbd->d.source = cbd->source;

View File

@ -159,7 +159,7 @@ bool readSlowAnalogInputs(adcsample_t* convertedSamples) {
} }
// Average samples to get some noise filtering and oversampling // Average samples to get some noise filtering and oversampling
for (int i = 0; i < slowChannelCount; i++) { for (size_t i = 0; i < slowChannelCount; i++) {
uint32_t sum = 0; uint32_t sum = 0;
size_t index = i; size_t index = i;
for (size_t j = 0; j < SLOW_ADC_OVERSAMPLE; j++) { for (size_t j = 0; j < SLOW_ADC_OVERSAMPLE; j++) {

View File

@ -63,7 +63,7 @@ static SPIConfig cj125spicfg = {
#endif /* HAL_USE_SPI */ #endif /* HAL_USE_SPI */
static volatile int lastSlowAdcCounter = 0; static uint32_t lastSlowAdcCounter = 0;
// LSU conversion tables. See cj125_sensor_type_e // LSU conversion tables. See cj125_sensor_type_e
// For LSU4.2, See http://www.bosch-motorsport.com/media/catalog_resources/Lambda_Sensor_LSU_42_Datasheet_51_en_2779111435pdf.pdf // For LSU4.2, See http://www.bosch-motorsport.com/media/catalog_resources/Lambda_Sensor_LSU_42_Datasheet_51_en_2779111435pdf.pdf