FrogPilot setup
This commit is contained in:
@@ -167,7 +167,7 @@ def hw_state_thread(end_event, hw_queue):
|
||||
|
||||
|
||||
def thermald_thread(end_event, hw_queue) -> None:
|
||||
pm = messaging.PubMaster(['deviceState'])
|
||||
pm = messaging.PubMaster(['deviceState', 'frogpilotDeviceState'])
|
||||
sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "controlsState", "pandaStates"], poll=["pandaStates"])
|
||||
|
||||
count = 0
|
||||
@@ -245,6 +245,10 @@ def thermald_thread(end_event, hw_queue) -> None:
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
||||
fpmsg = messaging.new_message('frogpilotDeviceState')
|
||||
|
||||
pm.send("frogpilotDeviceState", fpmsg)
|
||||
|
||||
msg.deviceState.freeSpacePercent = get_available_percent(default=100.0)
|
||||
msg.deviceState.memoryUsagePercent = int(round(psutil.virtual_memory().percent))
|
||||
msg.deviceState.cpuUsagePercent = [int(round(n)) for n in psutil.cpu_percent(percpu=True)]
|
||||
|
||||
Reference in New Issue
Block a user