mirror of https://github.com/rusefi/rusefi-1.git
fix warnings (#2003)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
b2e26a2e2b
commit
4deb875204
|
@ -28,8 +28,8 @@ public:
|
|||
bool isHwUsed(adc_channel_e hwChannel) const;
|
||||
int size() const;
|
||||
void init(void);
|
||||
int conversionCount;
|
||||
int errorsCount;
|
||||
uint32_t conversionCount = 0;
|
||||
uint32_t errorsCount = 0;
|
||||
int getAdcValueByIndex(int internalIndex) const;
|
||||
void invalidateSamplesCache();
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
int getAdcValueByHwChannel(adc_channel_e hwChannel) const;
|
||||
|
||||
adc_state values;
|
||||
int channelCount;
|
||||
size_t channelCount = 0;
|
||||
private:
|
||||
ADCConversionGroup* hwConfig;
|
||||
/**
|
||||
|
|
|
@ -64,9 +64,6 @@ float getVoltage(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMET
|
|||
AdcDevice::AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf) {
|
||||
this->hwConfig = hwConfig;
|
||||
this->samples = buf;
|
||||
channelCount = 0;
|
||||
conversionCount = 0;
|
||||
errorsCount = 0;
|
||||
|
||||
hwConfig->sqr1 = 0;
|
||||
hwConfig->sqr2 = 0;
|
||||
|
@ -342,7 +339,7 @@ void AdcDevice::init(void) {
|
|||
}
|
||||
|
||||
bool AdcDevice::isHwUsed(adc_channel_e hwChannelIndex) const {
|
||||
for (int i = 0; i < channelCount; i++) {
|
||||
for (size_t i = 0; i < channelCount; i++) {
|
||||
if (hardwareIndexByIndernalAdcIndex[i] == hwChannelIndex) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue