VC++ compilation fix
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user