auto-sync
This commit is contained in:
parent
0955cbd536
commit
c56bb35a8d
|
@ -17,7 +17,7 @@
|
|||
#define EGT_CHANNEL_COUNT 8
|
||||
#define JOYSTICK_PIN_COUNT 5
|
||||
#define DIGIPOT_COUNT 4
|
||||
#define HW_MAX_ADC_INDEX 16
|
||||
#define HW_MAX_ADC_INDEX 17
|
||||
#define TRIGGER_SIMULATOR_PIN_COUNT 3
|
||||
#define LOGIC_ANALYZER_CHANNEL_COUNT 4
|
||||
#define LE_COMMAND_COUNT 16
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
class AdcDevice {
|
||||
public:
|
||||
AdcDevice(ADCConversionGroup* hwConfig);
|
||||
void addChannel(adc_channel_e hwChannelIndex);
|
||||
void enableChannel(adc_channel_e hwChannelIndex);
|
||||
void enableChannelAndPin(adc_channel_e hwChannelIndex);
|
||||
adc_channel_e getAdcHardwareIndexByInternalIndex(int index);
|
||||
int internalAdcIndexByHardwareIndex[20];
|
||||
bool isHwUsed(adc_channel_e hwChannel);
|
||||
|
|
|
@ -411,7 +411,7 @@ bool AdcDevice::isHwUsed(adc_channel_e hwChannelIndex) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void AdcDevice::addChannel(adc_channel_e hwChannel) {
|
||||
void AdcDevice::enableChannel(adc_channel_e hwChannel) {
|
||||
int logicChannel = channelCount++;
|
||||
|
||||
internalAdcIndexByHardwareIndex[hwChannel] = logicChannel;
|
||||
|
@ -424,6 +424,10 @@ void AdcDevice::addChannel(adc_channel_e hwChannel) {
|
|||
hwConfig->sqr1 += (hwChannel) << (5 * (logicChannel - 12));
|
||||
}
|
||||
// todo: support for more then 12 channels? not sure how needed it would be
|
||||
}
|
||||
|
||||
void AdcDevice::enableChannelAndPin(adc_channel_e hwChannel) {
|
||||
enableChannel(hwChannel);
|
||||
|
||||
initAdcHwChannel(hwChannel);
|
||||
}
|
||||
|
@ -548,9 +552,9 @@ void initAdcInputs(bool boardTestMode) {
|
|||
* in board test mode all currently enabled ADC channels are running in slow mode
|
||||
*/
|
||||
if (mode == ADC_SLOW || (boardTestMode && mode == ADC_FAST)) {
|
||||
slowAdc.addChannel((adc_channel_e) (ADC_CHANNEL_IN0 + adc));
|
||||
slowAdc.enableChannelAndPin((adc_channel_e) (ADC_CHANNEL_IN0 + adc));
|
||||
} else if (mode == ADC_FAST) {
|
||||
fastAdc.addChannel((adc_channel_e) (ADC_CHANNEL_IN0 + adc));
|
||||
fastAdc.enableChannelAndPin((adc_channel_e) (ADC_CHANNEL_IN0 + adc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ struct_no_prefix engine_configuration_s
|
|||
#define EGT_CHANNEL_COUNT 8
|
||||
#define JOYSTICK_PIN_COUNT 5
|
||||
#define DIGIPOT_COUNT 4
|
||||
#define HW_MAX_ADC_INDEX 16
|
||||
#define HW_MAX_ADC_INDEX 17
|
||||
#define TRIGGER_SIMULATOR_PIN_COUNT 3
|
||||
#define LOGIC_ANALYZER_CHANNEL_COUNT 4
|
||||
#define LE_COMMAND_COUNT 16
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jul 19 09:56:19 EDT 2016
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jul 19 20:52:56 EDT 2016
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int FSIO_ADC_COUNT = 4;
|
||||
|
@ -21,7 +21,7 @@ public class Fields {
|
|||
public static final int EGT_CHANNEL_COUNT = 8;
|
||||
public static final int JOYSTICK_PIN_COUNT = 5;
|
||||
public static final int DIGIPOT_COUNT = 4;
|
||||
public static final int HW_MAX_ADC_INDEX = 16;
|
||||
public static final int HW_MAX_ADC_INDEX = 17;
|
||||
public static final int TRIGGER_SIMULATOR_PIN_COUNT = 3;
|
||||
public static final int LOGIC_ANALYZER_CHANNEL_COUNT = 4;
|
||||
public static final int LE_COMMAND_COUNT = 16;
|
||||
|
|
Loading…
Reference in New Issue