fix host flag and simplify the headwind constructor
This commit is contained in:
parent
71ab300339
commit
28a8c01a5a
|
@ -1,12 +1,11 @@
|
|||
# Initialise flask
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
app.config['SERVER_NAME'] = '0.0.0.0:5000'
|
||||
app.config.from_prefixed_env()
|
||||
|
||||
# Initialise the bluetooth stack
|
||||
from bluewind import headwind
|
||||
fan = headwind.Headwind(app, app.config["ADDRESS"])
|
||||
fan = headwind.Headwind(app.config["ADDRESS"])
|
||||
|
||||
# Load the views
|
||||
from bluewind import views
|
|
@ -16,9 +16,7 @@ CHARACTERISTIC = "a026e038-0a7d-4ab3-97fa-f1500f9feb8b"
|
|||
|
||||
class Headwind:
|
||||
fanClient = None
|
||||
flaskApp = None
|
||||
def __init__(self, flaskApp, address):
|
||||
self.flaskApp = flaskApp
|
||||
def __init__(self, address):
|
||||
self.fanClient = BleakClient(address)
|
||||
|
||||
async def readSpeed(self):
|
||||
|
|
Loading…
Reference in New Issue