mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
Make driverview not pin two cores at 100%
old-commit-hash: fab8425f2f5277f3e767e29f01942448674428b0
This commit is contained in:
@@ -12,6 +12,7 @@ from common.basedir import BASEDIR
|
||||
|
||||
KILL_TIMEOUT = 15
|
||||
|
||||
|
||||
def send_controls_packet(pm):
|
||||
while True:
|
||||
dat = messaging.new_message('controlsState')
|
||||
@@ -19,6 +20,8 @@ def send_controls_packet(pm):
|
||||
"rearViewCam": True,
|
||||
}
|
||||
pm.send('controlsState', dat)
|
||||
time.sleep(0.01)
|
||||
|
||||
|
||||
def send_dmon_packet(pm, d):
|
||||
dat = messaging.new_message('dMonitoringState')
|
||||
@@ -29,6 +32,7 @@ def send_dmon_packet(pm, d):
|
||||
}
|
||||
pm.send('dMonitoringState', dat)
|
||||
|
||||
|
||||
def main():
|
||||
pm = messaging.PubMaster(['controlsState', 'dMonitoringState'])
|
||||
controls_sender = multiprocessing.Process(target=send_controls_packet, args=[pm])
|
||||
@@ -70,5 +74,8 @@ def main():
|
||||
is_rhd = params.get("IsRHD") == b"1"
|
||||
is_rhd_checked = True
|
||||
|
||||
time.sleep(0.01)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user