voltageSeverity property
The severity of the DriveData.batteryVoltage readings.
Implementation
Severity? get voltageSeverity {
if (drive.batteryVoltage == 0) return null;
if (drive.batteryVoltage <= 25) {
return Severity.critical;
} else if (drive.batteryVoltage <= 26) {
return Severity.warning;
} else {
return null;
}
}