Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
I did shit and stuff
Browse files Browse the repository at this point in the history
Stuff and shit. Oh and shit and stuff
  • Loading branch information
studerCoder committed Jun 24, 2017
1 parent c8eb074 commit cef977d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Control/GCS/app.py
Expand Up @@ -11,7 +11,19 @@
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)

# tower = Tower()
tower = Tower()

def get_battery():
return tower.vehicle.batter.voltage

def get_vehicle_status():
"""Laundry list function.
"""
get_battery()
status = {}
status['battery'] = get_battery()
return status

@app.route('/')
def index():
Expand All @@ -20,7 +32,11 @@ def index():
@socketio.on('connect')
def on_connect():
send('Initialization in progress...')
emit('status', {'data': 42})
emit('status', {'status': get_vehicle_status()})
# emit('status', {'status': 'wazzup world'})




if __name__ == '__main__':
socketio.run(app, debug=True)

0 comments on commit cef977d

Please sign in to comment.