Skip to content

Commit

Permalink
Add TODOs to send traffic light to the simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMatthes committed Nov 30, 2023
1 parent b813092 commit b4e2789
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ride/services/ride.dart
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,13 @@ class Ride with ChangeNotifier {
shortcutId = null;
notifyListeners();
}

@override
void notifyListeners() {
super.notifyListeners();

// TODO: Display next signal group and its color on the simulator.
print("Current recommendation: ${predictionComponent?.recommendation}");
print("Current SG: $calcCurrentSG");
}
}
4 changes: 4 additions & 0 deletions lib/ride/views/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ class RideViewState extends State<RideView> {
// Set `sessionId` to a random new value and bind the callbacks.
await ride.startNavigation(sgStatus.onNewPredictionStatusDuringRide);
await ride.selectRoute(routing.selectedRoute!);

// TODO: Send the selected route to the s(t)imulator.
print("Selected route: ${routing.selectedRoute!.signalGroups}");

// Connect the datastream mqtt client, if the user enabled real-time data.
final settings = getIt<Settings>();
if (settings.datastreamMode == DatastreamMode.enabled) {
Expand Down

0 comments on commit b4e2789

Please sign in to comment.