Clean up build warnings (#4169)
* [build][OSX] Fix clang warnings. * [build][OSX] A few more warnings taken care of. * [build] Fixed yet more build warnings across all platforms. * [build] Fix final warning due to bad CMake flag. * [build] Remove unused variables as requested, fix indent. * Fix output display limit type for 8-bit targets.
This commit is contained in:
committed by
Bertrand Songis
parent
1666fd7355
commit
1eead1504c
@@ -247,9 +247,9 @@ void adcRead()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
const int8_t ana_direction[NUMBER_ANALOG] = {1,-1,1,-1, -1,1,-1, -1,-1, -1,1, 0,0,0};
|
||||
|
||||
#if !defined(SIMU)
|
||||
uint16_t getAnalogValue(uint8_t index)
|
||||
{
|
||||
if (ana_direction[index] < 0)
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
|
||||
volatile uint8_t dacStarted = false;
|
||||
|
||||
#if !defined(SIMU)
|
||||
|
||||
#if !defined(SOFTWARE_VOLUME)
|
||||
const int8_t volumeScale[VOLUME_LEVEL_MAX+1] =
|
||||
{
|
||||
0, 2, 4, 6, 8, 10, 13, 17, 22, 27, 33, 40,
|
||||
64, 82, 96, 105, 112, 117, 120, 122, 124, 125, 126, 127
|
||||
} ;
|
||||
|
||||
#if !defined(SIMU)
|
||||
#endif
|
||||
|
||||
void setSampleRate(uint32_t frequency)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define SAMPTIME 2 // sample time = 28 cycles
|
||||
#define SAMPTIME_LONG 3 // sample time = 56 cycles
|
||||
|
||||
#if !defined(SIMU)
|
||||
#if defined(PCBX9E) && defined(HORUS_STICKS)
|
||||
const int8_t ana_direction[NUMBER_ANALOG] = {1,-1,1,-1, -1,-1,-1,1, -1,1,1,1, -1};
|
||||
#elif defined(PCBX9E)
|
||||
@@ -37,15 +38,18 @@
|
||||
#else
|
||||
const int8_t ana_direction[NUMBER_ANALOG] = {1,-1,1,-1, -1,1,0, -1,1, 1};
|
||||
#endif
|
||||
#endif // #if !defined(SIMU)
|
||||
|
||||
#if defined(PCBX9E)
|
||||
#define NUMBER_ANALOG_ADC1 10
|
||||
#define NUMBER_ANALOG_ADC3 (NUMBER_ANALOG - 10)
|
||||
#if !defined(SIMU)
|
||||
// mapping from adcValues order to enum Analogs
|
||||
const uint8_t ana_mapping[NUMBER_ANALOG] = { 0 /*STICK1*/, 1 /*STICK2*/, 2 /*STICK3*/, 3 /*STICK4*/,
|
||||
10 /*POT1*/, 4 /*POT2*/, 5 /*POT3*/, 6 /*POT4*/,
|
||||
11 /*SLIDER1*/, 12 /*SLIDER2*/, 7 /*SLIDER3*/, 8 /*SLIDER4*/,
|
||||
9 /*TX_VOLTAGE*/ };
|
||||
#endif // !defined(SIMU)
|
||||
#else
|
||||
#define NUMBER_ANALOG_ADC1 NUMBER_ANALOG
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ extern "C" void INTERRUPT_5MS_IRQHandler()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBX9E)
|
||||
#if defined(PCBX9E) && !defined(SIMU)
|
||||
#define PWR_PRESS_DURATION_MIN 200 // 2s
|
||||
#define PWR_PRESS_DURATION_MAX 500 // 5s
|
||||
|
||||
@@ -109,7 +109,7 @@ const pm_uchar bmp_startup[] PROGMEM = {
|
||||
const pm_uchar bmp_lock[] PROGMEM = {
|
||||
#include "lock.lbm"
|
||||
};
|
||||
#endif
|
||||
#endif // defined(PCBX9E) && !defined(SIMU)
|
||||
|
||||
void boardInit()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user