More compiler warnings, unused variables mostly

This commit is contained in:
Paul Warren 2017-01-15 15:43:22 +11:00
parent 0aeba6c947
commit aaa24f87de
5 changed files with 1047 additions and 1047 deletions

File diff suppressed because it is too large Load diff

View file

@ -185,8 +185,8 @@ extern const Gpio_Pin FIVE_VOLT_REGULATOR_ENABLE;
// extern const Timer_Pin SERVO1; // extern const Timer_Pin SERVO1;
// extern const Timer_Pin SERVO2; // extern const Timer_Pin SERVO2;
extern inline bool //extern inline bool
hal_checkTimeout (uint32_t startTime_ms, uint32_t interval_ms); //hal_checkTimeout (uint32_t startTime_ms, uint32_t interval_ms);
// returns true if the interval has timed out // returns true if the interval has timed out
int int

View file

@ -393,7 +393,7 @@ void Adafruit_GFX_drawBitmap(int16_t x, int16_t y,
#endif #endif
void Adafruit_GFX_drawColorBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h, uint16_t tintMask) void Adafruit_GFX_drawColorBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h, uint16_t tintMask)
{ {
int16_t i, j, bmIndex; int16_t i; //, j, bmIndex;
Adafruit_ILI9340_setAddrWindow(x,y,x+w-1, y+h-1); Adafruit_ILI9340_setAddrWindow(x,y,x+w-1, y+h-1);

View file

@ -268,10 +268,10 @@ void applyCoeficient(float *samples, int shift)
filterTemp[i * 2 + 1] = samples[i * 2 + 1] * fftFilterCoeficient[i * 2 + 1] + samples[i * 2] * fftFilterCoeficient[i * 2]; filterTemp[i * 2 + 1] = samples[i * 2 + 1] * fftFilterCoeficient[i * 2 + 1] + samples[i * 2] * fftFilterCoeficient[i * 2];
} }
int shifter; //int shifter;
for(i = 0; i < FFT_BUFFER_SIZE; i++) for(i = 0; i < FFT_BUFFER_SIZE; i++)
{ {
shifter = i + 2 * shift; //shifter = i + 2 * shift;
if(i < 0) samples[i] = 0; if(i < 0) samples[i] = 0;
if(i > FFT_BUFFER_SIZE - 1) samples[i] = 0; if(i > FFT_BUFFER_SIZE - 1) samples[i] = 0;
samples[i] = filterTemp[i + 2 * shift]; samples[i] = filterTemp[i + 2 * shift];
@ -1080,7 +1080,7 @@ setFreq(vfoAFrequency);
//TIM_Config(); //TIM_Config();
TIM_Try(); TIM_Try();
long long timeMeasurement = 0; //long long timeMeasurement = 0;
updateDisplay(1); updateDisplay(1);
@ -1115,9 +1115,9 @@ setFreq(vfoAFrequency);
//HAL_UART_Receive_IT(&UartHandle, (uint8_t*)aRxBuffer, 16); //HAL_UART_Receive_IT(&UartHandle, (uint8_t*)aRxBuffer, 16);
int* p = UartHandle.pRxBuffPtr; //int* p = UartHandle.pRxBuffPtr;
int* q = &aRxBuffer; //int* q = &aRxBuffer;
int difference = p- q; //int difference = p- q;
updateMenu(); updateMenu();
@ -1550,7 +1550,7 @@ void drawWaterfall(void)
float fftMax = 0; //AH! These are being reset each time! Static makes them persistant right? Does it also ensure they are float fftMax = 0; //AH! These are being reset each time! Static makes them persistant right? Does it also ensure they are
float fftMin = 100; //only initialized once? Have to try it when I get home. It would certainly be nice if the waterfall float fftMin = 100; //only initialized once? Have to try it when I get home. It would certainly be nice if the waterfall
static float fftMaxMax = 0; //didn't change in brightness so much. Later, I may want to fix these values, or at least, make them static float fftMaxMax = 0; //didn't change in brightness so much. Later, I may want to fix these values, or at least, make them
static float logMax; //manually controllable, sorta, you know? //static float logMax; //manually controllable, sorta, you know?
uint8_t i; uint8_t i;
for(i = 1; i < 255; i++) //If bin 0 is the DC offset, should we skip it in this calculation? for(i = 1; i < 255; i++) //If bin 0 is the DC offset, should we skip it in this calculation?
{ {
@ -1561,7 +1561,7 @@ void drawWaterfall(void)
//logMax = log2(fftMax); //logMax = log2(fftMax);
if(fftMax > fftMaxMax) fftMaxMax += fftMax * 0.1; if(fftMax > fftMaxMax) fftMaxMax += fftMax * 0.1;
logMax = log2(fftMaxMax); //logMax = log2(fftMaxMax);
fftMaxMax *= 0.99; fftMaxMax *= 0.99;
if (fftMaxMax > fftMaxMaxMax) fftMaxMax = fftMaxMaxMax; if (fftMaxMax > fftMaxMaxMax) fftMaxMax = fftMaxMaxMax;
if (fftMaxMax < fftMaxMaxMin) fftMaxMax = fftMaxMaxMin; if (fftMaxMax < fftMaxMaxMin) fftMaxMax = fftMaxMaxMin;

View file

@ -22,7 +22,7 @@
void spi_init(void) void spi_init(void)
{ {
SPI_InitTypeDef spiInitStructure; //SPI_InitTypeDef spiInitStructure;
GPIO_InitTypeDef gpioInitStructure; GPIO_InitTypeDef gpioInitStructure;
HAL_SPI_MspInit(&SpiHandle); HAL_SPI_MspInit(&SpiHandle);