VC++ compilation fix

This commit is contained in:
Bertrand Songis
2016-01-31 11:34:07 +01:00
parent 979a86f24e
commit 40ae1879e8
9 changed files with 52 additions and 51 deletions
+3 -3
View File
@@ -1544,9 +1544,9 @@ void getADC()
}
#endif
for (uint32_t i=0; i<4; i++) {
for (uint8_t i=0; i<4; i++) {
adcRead();
for (uint32_t x=0; x<NUMBER_ANALOG; x++) {
for (uint8_t x=0; x<NUMBER_ANALOG; x++) {
uint16_t val = getAnalogValue(x);
#if defined(JITTER_MEASURE)
if (JITTER_MEASURE_ACTIVE()) {
@@ -1557,7 +1557,7 @@ void getADC()
}
}
for (uint32_t x=0; x<NUMBER_ANALOG; x++) {
for (uint8_t x=0; x<NUMBER_ANALOG; x++) {
uint16_t v = temp[x] >> 3;
#if defined(JITTER_FILTER)
+1 -1
View File
@@ -973,7 +973,7 @@ void checkAlarm();
void checkAll();
#if !defined(SIMU)
void getADC();
void getADC();
#endif
#if defined(SBUS)
+2 -1
View File
@@ -762,8 +762,9 @@ void checkSwitches()
#define GETADC_COUNT 1
#endif
#ifdef GETADC_COUNT
for (int i=0; i<GETADC_COUNT; i++)
for (uinr8_t i=0; i<GETADC_COUNT; i++) {
getADC();
}
#undef GETADC_COUNT
#endif
#endif // !defined(MODULE_ALWAYS_SEND_PULSES)
+1 -1
View File
@@ -201,7 +201,7 @@ void adcRead()
const int8_t ana_direction[NUMBER_ANALOG] = {1,-1,1,-1, -1,1,-1, -1,-1, -1,1, 0,0,0};
uint16_t getAnalogValue(uint32_t index)
uint16_t getAnalogValue(uint8_t index)
{
if (ana_direction[index] < 0)
return 4096 - adcValues[index];
+1 -1
View File
@@ -233,7 +233,7 @@ enum Analogs {
extern uint16_t adcValues[NUMBER_ANALOG];
void adcInit(void);
void adcRead(void);
uint16_t getAnalogValue(uint32_t value);
uint16_t getAnalogValue(uint8_t index);
#if defined(REV3)
#define BATT_SCALE 120
+21 -21
View File
@@ -1,23 +1,23 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "../opentx.h"
uint16_t adcValues[NUMBER_ANALOG];
@@ -112,7 +112,7 @@ void adcRead()
#endif
}
uint16_t getAnalogValue(uint32_t value)
uint16_t getAnalogValue(uint8_t value)
{
return adcValues[value];
}
+1 -1
View File
@@ -227,7 +227,7 @@ enum Analogs {
};
void adcInit();
void adcRead(void);
uint16_t getAnalogValue(uint32_t value);
uint16_t getAnalogValue(uint8_t index);
void setSticksGain(uint8_t gains);
// Buzzer driver
+21 -21
View File
@@ -1,23 +1,23 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "../../opentx.h"
#define PIN_ANALOG 0x0003
@@ -148,7 +148,7 @@ void adcStop()
{
}
uint16_t getAnalogValue(uint32_t index)
uint16_t getAnalogValue(uint8_t index)
{
if (IS_POT(index) && !IS_POT_AVAILABLE(index)) {
// Use fixed analog value for non-existing and/or non-connected pots.
+1 -1
View File
@@ -265,7 +265,7 @@ enum Analogs {
void adcInit(void);
void adcRead(void);
extern uint16_t adcValues[NUMBER_ANALOG];
uint16_t getAnalogValue(uint32_t value);
uint16_t getAnalogValue(uint8_t index);
#define BATT_SCALE 150