Skip to content

Commit

Permalink
Propagate flush bearings to other clients
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Jessop authored and Mark Jessop committed Jul 18, 2022
1 parent 622766a commit 7356c1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions horusmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ def clear_bearing_data(data):
global bearing_store
logging.warning("Client requested bearing data be cleared.")
bearing_store.flush()
flask_emit_event("server_bearings_cleared", {"foo":"bar"})


@socketio.on("mark_recovered", namespace="/chasemapper")
Expand Down
1 change: 0 additions & 1 deletion static/js/bearings.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ function flushBearings(){
var _confirm = confirm("Really clear all Bearing data?");
if (_confirm == true){
socket.emit('bearing_store_clear', {data: 'plzkthx'});

destroyAllBearings();
}

Expand Down
4 changes: 4 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@
bearingUpdate(data);
});

socket.on('server_bearings_cleared', function(data){
destroyAllBearings();
});


$("#downloadModel").click(function(){
socket.emit('download_model', {data: 'plzkthx'});
Expand Down

0 comments on commit 7356c1a

Please sign in to comment.