Skip to content

Commit

Permalink
change range to ODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamuel committed Aug 6, 2024
1 parent 7f880dc commit 2aebe3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/bike.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ class Bike extends _$Bike {
//update Battery State
state = newState.updateRideFromData(rideData);
}
// Read the ride state to update the battery level
var totalData = await ref
.read(bluetoothRepositoryProvider)
.readCurrentState(state.id, 'TOTAL');
if (totalData != null && totalData.isNotEmpty) {
//update Battery State
state = newState.updateTotalFromData(totalData);
}
});
}

Expand Down

0 comments on commit 2aebe3d

Please sign in to comment.