fix things, some things should work
This commit is contained in:
+21
-21
@@ -1,22 +1,22 @@
|
||||
from app_events import socketio
|
||||
from threading import Thread
|
||||
|
||||
class GPS:
|
||||
def __init__(self):
|
||||
self.LocationX = None
|
||||
self.LocationY= None
|
||||
|
||||
@socketio.on('gps')
|
||||
def get_gps():
|
||||
global LocationX
|
||||
global LocationY
|
||||
|
||||
LocationX = "45.5202844"
|
||||
LocationY = "-73.5493208"
|
||||
Location = [LocationX, LocationY]
|
||||
|
||||
socketio.emit('gps_location', Location)
|
||||
|
||||
print("websocket should be sent now")
|
||||
|
||||
from modules.app_events import socketio
|
||||
from threading import Thread
|
||||
|
||||
class GPS:
|
||||
def __init__(self):
|
||||
self.LocationX = None
|
||||
self.LocationY= None
|
||||
|
||||
@socketio.on('gps')
|
||||
def get_gps():
|
||||
global LocationX
|
||||
global LocationY
|
||||
|
||||
LocationX = "45.5202844"
|
||||
LocationY = "-73.5493208"
|
||||
Location = [LocationX, LocationY]
|
||||
|
||||
socketio.emit('gps_location', Location)
|
||||
|
||||
print("websocket should be sent now")
|
||||
|
||||
return print("socket.io emitted")
|
||||
Reference in New Issue
Block a user