diff --git a/src/main/drivers/light_ws2811strip_hal.c b/src/main/drivers/light_ws2811strip_hal.c index 27c8ce67d2..7b4d6875c4 100644 --- a/src/main/drivers/light_ws2811strip_hal.c +++ b/src/main/drivers/light_ws2811strip_hal.c @@ -91,23 +91,23 @@ void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim) /* Set hdma_tim instance */ hdma_tim.Instance = WS2811_DMA_STREAM; - uint32_t channelAddress = 0; + //uint32_t channelAddress = 0; switch (WS2811_TIMER_CHANNEL) { case TIM_CHANNEL_1: timDMASource = TIM_DMA_ID_CC1; - channelAddress = (uint32_t)(&WS2811_TIMER->CCR1); + //channelAddress = (uint32_t)(&WS2811_TIMER->CCR1); break; case TIM_CHANNEL_2: timDMASource = TIM_DMA_ID_CC2; - channelAddress = (uint32_t)(&WS2811_TIMER->CCR2); + //channelAddress = (uint32_t)(&WS2811_TIMER->CCR2); break; case TIM_CHANNEL_3: timDMASource = TIM_DMA_ID_CC3; - channelAddress = (uint32_t)(&WS2811_TIMER->CCR3); + //channelAddress = (uint32_t)(&WS2811_TIMER->CCR3); break; case TIM_CHANNEL_4: timDMASource = TIM_DMA_ID_CC4; - channelAddress = (uint32_t)(&WS2811_TIMER->CCR4); + //channelAddress = (uint32_t)(&WS2811_TIMER->CCR4); break; } diff --git a/src/main/drivers/pwm_mapping.c b/src/main/drivers/pwm_mapping.c index b6f327e61a..91039f51ce 100644 --- a/src/main/drivers/pwm_mapping.c +++ b/src/main/drivers/pwm_mapping.c @@ -32,8 +32,6 @@ #include "pwm_rx.h" #include "pwm_mapping.h" -void pwmMotorConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse, motorPwmProtocolTypes_e proto, bool enableOutput); -void pwmServoConfig(const timerHardware_t *timerHardware, uint8_t servoIndex, uint16_t servoPwmRate, uint16_t servoCenterPulse, bool enableOutput); /* Configuration maps diff --git a/src/main/drivers/pwm_output.h b/src/main/drivers/pwm_output.h index ecdd0768a1..54d59c7e55 100644 --- a/src/main/drivers/pwm_output.h +++ b/src/main/drivers/pwm_output.h @@ -32,3 +32,7 @@ void pwmWriteServo(uint8_t index, uint16_t value); void pwmDisableMotors(void); void pwmEnableMotors(void); +struct timerHardware_s; +void pwmMotorConfig(const struct timerHardware_s *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse, motorPwmProtocolTypes_e proto, bool enableOutput); +void pwmServoConfig(const struct timerHardware_s *timerHardware, uint8_t servoIndex, uint16_t servoPwmRate, uint16_t servoCenterPulse, bool enableOutput); + diff --git a/src/main/drivers/pwm_output_hal.c b/src/main/drivers/pwm_output_hal.c index dbe14c10f8..87d2a7c2bc 100644 --- a/src/main/drivers/pwm_output_hal.c +++ b/src/main/drivers/pwm_output_hal.c @@ -181,8 +181,9 @@ bool isMotorBrushed(uint16_t motorPwmRate) return (motorPwmRate > 500); } -void pwmMotorConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse, motorPwmProtocolTypes_e proto) +void pwmMotorConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, uint16_t motorPwmRate, uint16_t idlePulse, motorPwmProtocolTypes_e proto, bool enableOutput) { + UNUSED(enableOutput); uint32_t timerMhzCounter; pwmWriteFuncPtr pwmWritePtr; @@ -221,8 +222,9 @@ void pwmMotorConfig(const timerHardware_t *timerHardware, uint8_t motorIndex, ui } #ifdef USE_SERVOS -void pwmServoConfig(const timerHardware_t *timerHardware, uint8_t servoIndex, uint16_t servoPwmRate, uint16_t servoCenterPulse) +void pwmServoConfig(const timerHardware_t *timerHardware, uint8_t servoIndex, uint16_t servoPwmRate, uint16_t servoCenterPulse, bool enableOutput) { + UNUSED(enableOutput); servos[servoIndex] = pwmOutConfig(timerHardware, PWM_TIMER_MHZ, 1000000 / servoPwmRate, servoCenterPulse); } diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index fc8d92d4c7..a091492772 100644 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -131,8 +131,6 @@ static void cliBootlog(char *cmdline); static char cliBuffer[64]; static uint32_t bufferIndex = 0; -static const char* const emptyName = "-"; - #ifndef USE_QUAD_MIXER_ONLY // sync this with mixerMode_e static const char * const mixerNames[] = { @@ -168,6 +166,7 @@ static const rxFailsafeChannelMode_e rxFailsafeModesTable[RX_FAILSAFE_TYPE_COUNT static const char * const gyroNames[] = { "NONE", "AUTO", "MPU6050", "L3G4200D", "MPU3050", "L3GD20", "MPU6000", "MPU6500", "FAKE"}; // sync with accelerationSensor_e static const char * const lookupTableAccHardware[] = { "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "FAKE"}; +#if (FLASH_SIZE > 64) // sync with baroSensor_e static const char * const lookupTableBaroHardware[] = { "NONE", "AUTO", "BMP085", "MS5611", "BMP280", "FAKE"}; // sync with magSensor_e @@ -177,7 +176,6 @@ static const char * const lookupTableRangefinderHardware[] = { "NONE", "HCSR04", // sync with pitotSensor_e static const char * const lookupTablePitotHardware[] = { "NONE", "AUTO", "MS4525", "FAKE"}; -#if (FLASH_SIZE > 64) // sync this with sensors_e static const char * const sensorTypeNames[] = { "GYRO", "ACC", "BARO", "MAG", "SONAR", "PITOT", "GPS", "GPS+MAG", NULL diff --git a/src/main/target/BLUEJAYF4/hardware_revision.c b/src/main/target/BLUEJAYF4/hardware_revision.c index 00ae132b9a..eef481973d 100644 --- a/src/main/target/BLUEJAYF4/hardware_revision.c +++ b/src/main/target/BLUEJAYF4/hardware_revision.c @@ -29,6 +29,7 @@ #include "drivers/flash_m25p16.h" #include "hardware_revision.h" +#if 0 static const char * const hardwareRevisionNames[] = { "Unknown", "BlueJay rev1", @@ -36,6 +37,7 @@ static const char * const hardwareRevisionNames[] = { "BlueJay rev3", "BlueJay rev3a" }; +#endif uint8_t hardwareRevision = UNKNOWN;