Skip to content

Commit

Permalink
Catched the end of the simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
javierganan99 committed Oct 15, 2023
1 parent 784471c commit 9901062
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/static/js/simulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ function startSimulation () {
updatePoseMarkers(n_vehicles)
eventSourcePose = new EventSource('/simulation')
eventSourcePose.onmessage = function (event) {
const data = JSON.parse(event.data)
if (data === null) {
// TODO: SOLVE!
console.log(data)
if (event.data == 'None') {
stopSimulation()
return
}
const data = JSON.parse(event.data)
for (let i = 0; i < data.length; i++) {
ml = pose_markers[i].length
if (ml >= 1) {
Expand Down

0 comments on commit 9901062

Please sign in to comment.