squash warnings (#1984)
* warnings * unused * a few more * too much * uint16_t-ify
This commit is contained in:
parent
eb7a26be14
commit
ebb8ede1da
|
@ -63,8 +63,6 @@ extern SERIAL_USB_DRIVER EFI_CONSOLE_USB_DEVICE;
|
|||
|
||||
static bool isSerialConsoleStarted = false;
|
||||
|
||||
static event_listener_t consoleEventListener;
|
||||
|
||||
bool consoleByteArrived = false;
|
||||
|
||||
void onDataArrived(void) {
|
||||
|
|
|
@ -279,11 +279,6 @@ void updateDevConsoleState(void) {
|
|||
*/
|
||||
|
||||
static void showFuelInfo2(float rpm, float engineLoad) {
|
||||
|
||||
float baseFuelMs = 0; // TODO
|
||||
|
||||
float magicAir = SpeedDensityBase::getAirmassImpl(1, 100, convertCelsiusToKelvin(20) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
scheduleMsg(&logger, "inj flow %.2fcc/min displacement %.2fL", engineConfiguration->injector.flow,
|
||||
engineConfiguration->specs.displacement);
|
||||
|
||||
|
@ -303,13 +298,9 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
|||
float cltCorrection = engine->engineState.running.coolantTemperatureCoefficient;
|
||||
floatms_t injectorLag = engine->engineState.running.injectorLag;
|
||||
scheduleMsg(&logger2, "rpm=%.2f engineLoad=%.2f", rpm, engineLoad);
|
||||
scheduleMsg(&logger2, "baseFuel=%.2f", baseFuelMs);
|
||||
|
||||
scheduleMsg(&logger2, "iatCorrection=%.2f cltCorrection=%.2f injectorLag=%.2f", iatCorrection, cltCorrection,
|
||||
injectorLag);
|
||||
|
||||
float value = getRunningFuel(baseFuelMs PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
scheduleMsg(&logger2, "injection pulse width: %.2f", value);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -78,6 +78,9 @@ void setMockVBattVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
void setMockState(brain_pin_e pin, bool state) {
|
||||
#if EFI_UNIT_TEST
|
||||
mockPinStates[static_cast<int>(pin)] = state;
|
||||
#else
|
||||
UNUSED(pin);
|
||||
UNUSED(state);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ static void lcdPrintf(const char *fmt, ...) {
|
|||
lcd_HD44780_print_string(lcdLineBuffer);
|
||||
}
|
||||
|
||||
static void showLine(lcd_line_e line, int screenY) {
|
||||
static void showLine(lcd_line_e line, int /*screenY*/) {
|
||||
static char buffer[_MAX_FILLER + 2];
|
||||
|
||||
switch (line) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
void showInfo(Logging* logger, const char* sensorName) const override {}
|
||||
void showInfo(Logging* /*logger*/, const char* /*sensorName*/) const override {}
|
||||
|
||||
private:
|
||||
float (*m_func)();
|
||||
|
|
|
@ -36,7 +36,7 @@ void RedundantSensor::showInfo(Logging* logger, const char* sensorName) const {
|
|||
scheduleMsg(logger, "Sensor \"%s\" is redundant combining \"%s\" and \"%s\"", sensorName, getSensorName(m_first), getSensorName(m_second));
|
||||
}
|
||||
|
||||
void RpmCalculator::showInfo(Logging* logger, const char* sensorName) const {
|
||||
void RpmCalculator::showInfo(Logging* logger, const char* /*sensorName*/) const {
|
||||
scheduleMsg(logger, "RPM sensor: stopped: %d spinning up: %d cranking: %d running: %d rpm: %f",
|
||||
isStopped(),
|
||||
isSpinningUp(),
|
||||
|
|
|
@ -35,7 +35,7 @@ static void completionCallback(ADCDriver* adcp, adcsample_t*, size_t) {
|
|||
}
|
||||
}
|
||||
|
||||
static void errorCallback(ADCDriver*, adcerror_t err) {
|
||||
static void errorCallback(ADCDriver*, adcerror_t) {
|
||||
}
|
||||
|
||||
static const uint32_t smpr1 =
|
||||
|
@ -91,7 +91,6 @@ static const ADCConversionGroup adcConvGroupCh2 = { FALSE, 1, &completionCallbac
|
|||
0, // sqr2
|
||||
ADC_SQR3_SQ1_N(KNOCK_ADC_CH2)
|
||||
};
|
||||
#endif // KNOCK_HAS_CH2
|
||||
|
||||
static bool cylinderUsesChannel2(uint8_t cylinderIndex) {
|
||||
// C/C++ can't index in to bit fields, we have to provide lookup ourselves
|
||||
|
@ -112,6 +111,8 @@ static bool cylinderUsesChannel2(uint8_t cylinderIndex) {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // KNOCK_HAS_CH2
|
||||
|
||||
const ADCConversionGroup* getConversionGroup(uint8_t cylinderIndex) {
|
||||
#if KNOCK_HAS_CH2
|
||||
if (cylinderUsesChannel2(cylinderIndex)) {
|
||||
|
|
|
@ -7,13 +7,13 @@ EXTERN_CONFIG;
|
|||
OutputPin tcuSolenoids[TCU_SOLENOID_COUNT];
|
||||
|
||||
void SimpleTransmissionController::init() {
|
||||
for (int i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||
tcuSolenoids[i].initPin("Transmission Solenoid", CONFIG(tcu_solenoid)[i], &CONFIG(tcu_solenoid_mode)[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleTransmissionController::update(gear_e gear) {
|
||||
for (int i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {
|
||||
#ifndef EFI_UNIT_TEST
|
||||
tcuSolenoids[i].setValue(config->tcuSolenoidTable[static_cast<int>(gear) + 1][i]);
|
||||
#endif
|
||||
|
|
|
@ -148,7 +148,10 @@ static Logging *sharedLogger;
|
|||
static int fastMapSampleIndex;
|
||||
static int hipSampleIndex;
|
||||
static int tpsSampleIndex;
|
||||
|
||||
#if HAL_TRIGGER_USE_ADC
|
||||
static int triggerSampleIndex;
|
||||
#endif
|
||||
|
||||
#if HAL_USE_ADC
|
||||
extern AdcDevice fastAdc;
|
||||
|
|
|
@ -47,7 +47,7 @@ enum {
|
|||
// LCD_2X16_BUSY_FLAG = 0x80,
|
||||
// LCD_2X16_COMMAND = 0x01,
|
||||
// LCD_2X16_DATA = 0x00,
|
||||
} lcd_HD44780_command;
|
||||
} /*lcd_HD44780_command*/;
|
||||
|
||||
// http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html
|
||||
static const int lineStart[] = { 0, 0x40, 0x14, 0x54 };
|
||||
|
|
|
@ -277,14 +277,12 @@ static void enable_flash() {
|
|||
}
|
||||
|
||||
static void download_RAM(int target) {
|
||||
unsigned short memory_area = 0; // memory area
|
||||
unsigned short start_address = 0; // start address
|
||||
unsigned short codeWidthRegAddr = 0; // code width register address
|
||||
unsigned short size = 0; // size of RAM data
|
||||
unsigned short command = 0; // command data
|
||||
unsigned short data = 0; // RAM data
|
||||
unsigned int k = 0; // used in loop for writing RAM data to the chip
|
||||
const unsigned short *RAM_ptr; // pointer to array of data to be sent to the chip
|
||||
uint16_t memory_area = 0; // memory area
|
||||
uint16_t start_address = 0; // start address
|
||||
uint16_t codeWidthRegAddr = 0; // code width register address
|
||||
uint16_t size = 0; // size of RAM data
|
||||
uint16_t command = 0; // command data
|
||||
const uint16_t *RAM_ptr; // pointer to array of data to be sent to the chip
|
||||
|
||||
|
||||
//Why Again? For Every time, just in case?
|
||||
|
@ -341,26 +339,16 @@ static void download_RAM(int target) {
|
|||
command = start_address << 5;
|
||||
spi_writew(command); // sends start address command
|
||||
|
||||
/*
|
||||
for(k = 0; k < size; k++) // downloads RAM
|
||||
{
|
||||
data = *RAM_ptr; // retrieves data to be sent
|
||||
spi_writew(data); // sends data
|
||||
RAM_ptr++;
|
||||
}
|
||||
*/
|
||||
spiSend(driver, size, RAM_ptr);
|
||||
spiUnselect(driver);
|
||||
}
|
||||
|
||||
static void download_register(int r_target) {
|
||||
unsigned short r_start_address = 0; // start address
|
||||
unsigned short r_size = 0; // size of configuration data
|
||||
unsigned short r_command = 0; // command data
|
||||
unsigned short r_data = 0; // configuration data
|
||||
int n = 0; // used for loop for writing data to the chip
|
||||
unsigned short remainder_size = 0; // remainder size
|
||||
const unsigned short *reg_ptr; // pointer to array of data to be sent to the chip
|
||||
uint16_t r_start_address = 0; // start address
|
||||
uint16_t r_size = 0; // size of configuration data
|
||||
uint16_t r_command = 0; // command data
|
||||
uint16_t remainder_size = 0; // remainder size
|
||||
const uint16_t *reg_ptr; // pointer to array of data to be sent to the chip
|
||||
|
||||
switch(r_target) // selects target
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue