add dtc codes, wip

This commit is contained in:
Mathieu Moran
2023-11-06 17:46:54 -05:00
parent 86e6de5bab
commit 37f7d99883
5 changed files with 56 additions and 4 deletions
+23 -1
View File
@@ -1,5 +1,27 @@
import app_car as Car
account_car = Car()
account_car.model = "YARIS"
account_pp_image = "static\img\image.png"
account_info = ["name","pp_image", "car_model"]
class Account:
def __init__(self):
self.name = "quoije"
self.pp_image = None
self.car = None
self.car = account_car.model
def account_info():
obd_speed_lock.acquire()
cmd = obd.commands.GET_DTC # select an OBD command (sensor)
response = connection.query(cmd) # send the command and parse the response
try:
if response.is_null():
error_txt = "No data received."
print(error_txt)
socketio.emit('obd_dtc', error_txt)
else:
print(response.value)
socketio.emit('obd_dtc', response.value)
finally:
obd_rpm_lock.release()