FrogPilot setup - Configure cereal

This commit is contained in:
FrogAi
2024-06-07 02:58:29 -07:00
parent f7c9bd9201
commit ebf734a7e5
40 changed files with 276 additions and 95 deletions
+5 -1
View File
@@ -163,7 +163,7 @@ def hw_state_thread(end_event, hw_queue):
def hardware_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
@@ -401,6 +401,10 @@ def hardware_thread(end_event, hw_queue) -> None:
msg.deviceState.thermalStatus = thermal_status
pm.send("deviceState", msg)
fpmsg = messaging.new_message('frogpilotDeviceState')
pm.send("frogpilotDeviceState", fpmsg)
# Log to statsd
statlog.gauge("free_space_percent", msg.deviceState.freeSpacePercent)
statlog.gauge("gpu_usage_percent", msg.deviceState.gpuUsagePercent)