diff options
Diffstat (limited to 'lib/data/data_providers')
-rw-r--r-- | lib/data/data_providers/hybrid_notifier.dart | 4 | ||||
-rw-r--r-- | lib/data/data_providers/vehicle_notifier.dart | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/data/data_providers/hybrid_notifier.dart b/lib/data/data_providers/hybrid_notifier.dart index 51a65fe..f5431f8 100644 --- a/lib/data/data_providers/hybrid_notifier.dart +++ b/lib/data/data_providers/hybrid_notifier.dart @@ -47,7 +47,7 @@ class HybridNotifier extends StateNotifier<Hybrid> { } } - void updateHybridState(double speed, double engineSpeed, bool brake) { + void updateHybridState(double speed, int engineSpeed, bool brake) { // Variable to store the current state HybridState currentState = state.hybridState; @@ -58,7 +58,7 @@ class HybridNotifier extends StateNotifier<Hybrid> { double avgSpeed = 0.0; // Variable for storing the average value of RPM - double avgRpm = 0.0; + double avgRpm = 0; if (speed == 0 && engineSpeed <= 600) { // Set idle state. diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart index fb2de19..6583f9a 100644 --- a/lib/data/data_providers/vehicle_notifier.dart +++ b/lib/data/data_providers/vehicle_notifier.dart @@ -54,8 +54,8 @@ class VehicleNotifier extends Notifier<Vehicle> { } break; case VSSPath.vehicleEngineSpeed: - if (entry.value.hasFloat()) { - state = state.copyWith(engineSpeed: entry.value.float); + if (entry.value.hasUint32()) { + state = state.copyWith(engineSpeed: entry.value.uint32); } break; case VSSPath.vehicleFrontLeftTire: @@ -274,7 +274,7 @@ class VehicleNotifier extends Notifier<Vehicle> { var range = state.range; var psi = state.frontLeftTire; var actualSpeed = 0.0; - var actualRpm = 0.0; + var actualRpm = 0; var actualFuelLevel = 0.0; var actualInsideTemp = 0.0; var actualOutsideTemp = 0.0; |