mirror of
https://github.com/mck1117/wideband.git
synced 2026-10-16 00:56:29 -04:00
suggestion to improve naming (#294)
* Rename GetInternalBatteryVoltage() to GetInternalHeaterVoltage() * sampling, heater: fix Battery vs Heater naming mess --------- Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
This commit is contained in:
@@ -38,13 +38,12 @@ float Sampler::GetPumpNominalCurrent() const
|
||||
return pumpCurrentSenseVoltage * ratio;
|
||||
}
|
||||
|
||||
float Sampler::GetInternalBatteryVoltage() const
|
||||
float Sampler::GetInternalHeaterVoltage() const
|
||||
{
|
||||
#ifdef BATTERY_INPUT_DIVIDER
|
||||
// Dual HW can measure heater voltage for each channel
|
||||
// by measuring voltage on Heater- while FET is off
|
||||
// TODO: rename function?
|
||||
return internalBatteryVoltage;
|
||||
return internalHeaterVoltage;
|
||||
#else
|
||||
// After 5 seconds, pretend that we get battery voltage.
|
||||
// This makes the controller usable without CAN control
|
||||
@@ -116,7 +115,7 @@ void Sampler::ApplySample(AnalogChannelResult& result, float virtualGroundVoltag
|
||||
PUMP_FILTER_ALPHA * (result.PumpCurrentVoltage - virtualGroundVoltageInt);
|
||||
|
||||
#ifdef BATTERY_INPUT_DIVIDER
|
||||
internalBatteryVoltage = result.BatteryVoltage;
|
||||
internalHeaterVoltage = result.HeaterSupplyVoltage;
|
||||
#endif
|
||||
|
||||
// Shift history over by one
|
||||
|
||||
Reference in New Issue
Block a user