Fixed several issues:

- ADC has now averaging
- Pause screen added
- Fixed display glitches for most parts

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@258 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-19 15:24:24 +00:00
parent 51ffde94d7
commit 92bd68d8ba
18 changed files with 257 additions and 99 deletions

View File

@@ -43,7 +43,7 @@
// Constant and macro definitions
// -----------------------------------------------------------------------------
#define ADC_AVERAGE_DEPTH (10)
#define ADC_NUMBER_OF_CHANNELS (18) // 16 IOs + Temp + Vcc
// -----------------------------------------------------------------------------
@@ -85,7 +85,7 @@ struct Adc
ADC_TypeDef* ADCx;
ADC_InitTypeDef ADC_InitStruct;
bool useDMA;
bool useRanks;
int numberOfUsedChannels;
struct AdcChannel channel[ADC_NUMBER_OF_CHANNELS];
// Only necessary when the RANK parameter determines conversion order or RANK is used anyway
// For single conversions the READ function simply returns the converted value
@@ -93,7 +93,7 @@ struct Adc
// When initialising an ADC channel to a regular group, the RANK parameter determines the
// order of convertions. E.G. channel 5 can be put first while channel 1 can be put last.
// The array index stands for the RANK
uint16_t channelValue[ADC_NUMBER_OF_CHANNELS];
uint16_t channelValue[ADC_NUMBER_OF_CHANNELS * ADC_AVERAGE_DEPTH];
bool initialized;
};