Useful Volume menu item. Compiler warnings in main.c
This commit is contained in:
parent
2a0a65cff1
commit
5510302b11
4 changed files with 33153 additions and 3796 deletions
5976
Debug/PSDR.hex
5976
Debug/PSDR.hex
File diff suppressed because it is too large
Load diff
30901
Debug/PSDR.map
30901
Debug/PSDR.map
File diff suppressed because it is too large
Load diff
|
@ -108,3 +108,27 @@ TIM_HandleTypeDef TimHandle4;
|
||||||
|
|
||||||
SPI_HandleTypeDef SpiHandle;
|
SPI_HandleTypeDef SpiHandle;
|
||||||
UART_HandleTypeDef UartHandle;
|
UART_HandleTypeDef UartHandle;
|
||||||
|
|
||||||
|
|
||||||
|
/* main.c functions */
|
||||||
|
|
||||||
|
void drawNumber(char c, uint16_t x, uint16_t y, uint16_t tintMask);
|
||||||
|
void drawNumberSmall(char c, uint16_t x, uint16_t y, uint16_t tintMask);
|
||||||
|
void TIM_Try(void);
|
||||||
|
void TIM3_IRQHandler(void);
|
||||||
|
void TIM4_IRQHandler(void);
|
||||||
|
void initDac1();
|
||||||
|
void dac1SetValue(uint16_t value);
|
||||||
|
void dac2SetValue(uint16_t value);
|
||||||
|
void drawSMeter(void);
|
||||||
|
void updateMenu();
|
||||||
|
void updateDisplay(uint8_t force);
|
||||||
|
void drawWaterfall(void);
|
||||||
|
void Tick(void);
|
||||||
|
void updateVfo(void);
|
||||||
|
void zeroSampleBank(float *samples);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ int isFwd;
|
||||||
#define EncoderPinP 21 // Rotary Encoder Click //
|
#define EncoderPinP 21 // Rotary Encoder Click //
|
||||||
|
|
||||||
|
|
||||||
Encoder()
|
void Encoder(void)
|
||||||
{
|
{
|
||||||
Position = 0;
|
Position = 0;
|
||||||
Position2 = 0;
|
Position2 = 0;
|
||||||
|
@ -1150,7 +1150,7 @@ setFreq(vfoAFrequency);
|
||||||
|
|
||||||
float passBandRms = 0;
|
float passBandRms = 0;
|
||||||
int lastSMeterBarWidth = 0;
|
int lastSMeterBarWidth = 0;
|
||||||
void drawSMeter()
|
void drawSMeter(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Adafruit_GFX_fillRect(150, 160, 170, 3, ILI9340_BLACK);
|
//Adafruit_GFX_fillRect(150, 160, 170, 3, ILI9340_BLACK);
|
||||||
|
@ -1327,7 +1327,7 @@ void updateDisplay(uint8_t force)
|
||||||
//Adafruit_GFX_drawColorBitmap(320 - 45 - 2, 240 - 46 - 2, bitmapHadLogo, 45, 46, MASKWHITE);
|
//Adafruit_GFX_drawColorBitmap(320 - 45 - 2, 240 - 46 - 2, bitmapHadLogo, 45, 46, MASKWHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(&freqChar, "%9d", vfoAFrequency);
|
sprintf(freqChar, "%9ld", vfoAFrequency);
|
||||||
|
|
||||||
//So on each of these elements, we update when the value changes, when we're forced to, when the item becomes selected, or unselected.
|
//So on each of these elements, we update when the value changes, when we're forced to, when the item becomes selected, or unselected.
|
||||||
if(freqChar[0] != lastFreqChar[0]
|
if(freqChar[0] != lastFreqChar[0]
|
||||||
|
@ -1399,7 +1399,7 @@ void updateDisplay(uint8_t force)
|
||||||
|| (menuPos != menuLastPos && (menuPos == filterLowMenuItem
|
|| (menuPos != menuLastPos && (menuPos == filterLowMenuItem
|
||||||
|| menuLastPos == filterLowMenuItem)))
|
|| menuLastPos == filterLowMenuItem)))
|
||||||
{
|
{
|
||||||
sprintf(&freqChar, "%4d", filterLowerLimit * 40);
|
sprintf(freqChar, "%4d", filterLowerLimit * 40);
|
||||||
//Adafruit_GFX_setTextSize(2);
|
//Adafruit_GFX_setTextSize(2);
|
||||||
//Adafruit_GFX_setTextColor(menuPos == 7 ? ILI9340_RED : ILI9340_WHITE, ILI9340_BLACK);
|
//Adafruit_GFX_setTextColor(menuPos == 7 ? ILI9340_RED : ILI9340_WHITE, ILI9340_BLACK);
|
||||||
//Adafruit_GFX_setCursor(200, 135 );
|
//Adafruit_GFX_setCursor(200, 135 );
|
||||||
|
@ -1421,7 +1421,7 @@ void updateDisplay(uint8_t force)
|
||||||
|| (menuPos != menuLastPos && (menuPos == filterHighMenuItem
|
|| (menuPos != menuLastPos && (menuPos == filterHighMenuItem
|
||||||
|| menuLastPos == filterHighMenuItem)))
|
|| menuLastPos == filterHighMenuItem)))
|
||||||
{
|
{
|
||||||
sprintf(&freqChar, "%-4d", filterUpperLimit * 40);
|
sprintf(freqChar, "%-4d", filterUpperLimit * 40);
|
||||||
//Adafruit_GFX_setTextSize(2);
|
//Adafruit_GFX_setTextSize(2);
|
||||||
//Adafruit_GFX_setTextColor(menuPos == 8 ? ILI9340_RED : ILI9340_WHITE, ILI9340_BLACK);
|
//Adafruit_GFX_setTextColor(menuPos == 8 ? ILI9340_RED : ILI9340_WHITE, ILI9340_BLACK);
|
||||||
//Adafruit_GFX_setCursor(265, 135 );
|
//Adafruit_GFX_setCursor(265, 135 );
|
||||||
|
@ -1440,7 +1440,11 @@ void updateDisplay(uint8_t force)
|
||||||
|
|
||||||
if(afGainLast != afGain || force || (menuPos != menuLastPos && (menuPos == volumeMenuItem || menuLastPos == volumeMenuItem)))
|
if(afGainLast != afGain || force || (menuPos != menuLastPos && (menuPos == volumeMenuItem || menuLastPos == volumeMenuItem)))
|
||||||
{
|
{
|
||||||
sprintf(&freqChar, "%-4f", afGain * 100);
|
freqChar[0] = '4';
|
||||||
|
freqChar[1] = '3';
|
||||||
|
freqChar[2] = '2';
|
||||||
|
freqChar[3] = '1';
|
||||||
|
sprintf(freqChar, "%4d", (int)(afGain * 10));
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < 4; i++)
|
for(i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
|
@ -1504,7 +1508,7 @@ void updateDisplay(uint8_t force)
|
||||||
}
|
}
|
||||||
|
|
||||||
int newWaterFallData = 0;
|
int newWaterFallData = 0;
|
||||||
void drawWaterfall()
|
void drawWaterfall(void)
|
||||||
{
|
{
|
||||||
if(newWaterFallData == 1)
|
if(newWaterFallData == 1)
|
||||||
{
|
{
|
||||||
|
@ -1515,9 +1519,9 @@ void drawWaterfall()
|
||||||
unsigned short *gradient;
|
unsigned short *gradient;
|
||||||
|
|
||||||
if(transmitting)
|
if(transmitting)
|
||||||
gradient = &bitmapIronGradient;
|
gradient = bitmapIronGradient;
|
||||||
else
|
else
|
||||||
gradient = &bitmapWebSdrGradient;
|
gradient = bitmapWebSdrGradient;
|
||||||
|
|
||||||
//arm_cmplx_mag_f32(samplesDisplay, magnitudes, FFT_SIZE);
|
//arm_cmplx_mag_f32(samplesDisplay, magnitudes, FFT_SIZE);
|
||||||
arm_cmplx_mag_f32(samplesDisplay, magnitudes, FFT_SIZE);
|
arm_cmplx_mag_f32(samplesDisplay, magnitudes, FFT_SIZE);
|
||||||
|
@ -1731,7 +1735,7 @@ void processStream()
|
||||||
//clearTimUpdateFlag(&TimHandle4);
|
//clearTimUpdateFlag(&TimHandle4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateVfo()
|
void updateVfo(void)
|
||||||
{
|
{
|
||||||
encoderPos = getPos();
|
encoderPos = getPos();
|
||||||
if(encoderPos != encoderLastPos)
|
if(encoderPos != encoderLastPos)
|
||||||
|
@ -2003,19 +2007,19 @@ HAL_NVIC_EnableIRQ(TIM4_IRQn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TIM3_IRQHandler(void)
|
void TIM3_IRQHandler(void)
|
||||||
{
|
{
|
||||||
HAL_TIM_IRQHandler(&TimHandle);
|
HAL_TIM_IRQHandler(&TimHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
TIM4_IRQHandler(void)
|
void TIM4_IRQHandler(void)
|
||||||
{
|
{
|
||||||
processStream();
|
processStream();
|
||||||
HAL_TIM_IRQHandler(&TimHandle4);
|
HAL_TIM_IRQHandler(&TimHandle4);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ledState = 0;
|
int ledState = 0;
|
||||||
HAL_TIM_PeriodElapsedCallback(htim)
|
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
captureSamples();
|
captureSamples();
|
||||||
// doNothing();
|
// doNothing();
|
||||||
|
|
Loading…
Reference in a new issue