mirror of
https://github.com/mck1117/wideband.git
synced 2026-10-16 00:56:29 -04:00
remove GetInternalBatteryVoltage helper
This commit is contained in:
@@ -36,7 +36,7 @@ void SamplingUpdateLiveData()
|
|||||||
data->heaterState = (uint8_t)GetHeaterState(ch);
|
data->heaterState = (uint8_t)GetHeaterState(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
livedata_common.vbatt = GetInternalBatteryVoltage(0);
|
livedata_common.vbatt = GetSampler(0).GetInternalBatteryVoltage();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
@@ -173,9 +173,3 @@ void StartSampling()
|
|||||||
adcStart(&ADCD1, nullptr);
|
adcStart(&ADCD1, nullptr);
|
||||||
chThdCreateStatic(waSamplingThread, sizeof(waSamplingThread), NORMALPRIO + 5, SamplingThread, nullptr);
|
chThdCreateStatic(waSamplingThread, sizeof(waSamplingThread), NORMALPRIO + 5, SamplingThread, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove these helpers
|
|
||||||
float GetInternalBatteryVoltage(int ch)
|
|
||||||
{
|
|
||||||
return samplers[ch].GetInternalBatteryVoltage();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -14,5 +14,3 @@ struct ISampler
|
|||||||
const ISampler& GetSampler(int ch);
|
const ISampler& GetSampler(int ch);
|
||||||
|
|
||||||
void StartSampling();
|
void StartSampling();
|
||||||
|
|
||||||
float GetInternalBatteryVoltage(int ch);
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static void UartThread(void*)
|
|||||||
float lambda = GetLambda(ch);
|
float lambda = GetLambda(ch);
|
||||||
int lambdaIntPart = lambda;
|
int lambdaIntPart = lambda;
|
||||||
int lambdaThousandths = (lambda - lambdaIntPart) * 1000;
|
int lambdaThousandths = (lambda - lambdaIntPart) * 1000;
|
||||||
int batteryVoltageMv = GetInternalBatteryVoltage(ch) * 1000;
|
int batteryVoltageMv = GetSampler(ch).GetInternalBatteryVoltage() * 1000;
|
||||||
int duty = GetHeaterDuty(ch) * 100;
|
int duty = GetHeaterDuty(ch) * 100;
|
||||||
|
|
||||||
size_t writeCount = chsnprintf(printBuffer, 200,
|
size_t writeCount = chsnprintf(printBuffer, 200,
|
||||||
|
|||||||
Reference in New Issue
Block a user