mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 19:42:07 +08:00
Check IsTakingSnapshot is not set before starting snapshot
old-commit-hash: 7cd2c4c18f76143f7d71e001a3c934fd43e65089
This commit is contained in:
@@ -22,6 +22,9 @@ def snapshot():
|
||||
params = Params()
|
||||
front_camera_allowed = int(params.get("RecordFront"))
|
||||
|
||||
if params.get("IsTakingSnapshot") == b"1":
|
||||
return None
|
||||
|
||||
params.put("IsTakingSnapshot", "1")
|
||||
params.put("Offroad_IsTakingSnapshot", json.dumps(OFFROAD_ALERTS["Offroad_IsTakingSnapshot"]))
|
||||
time.sleep(2.0) # Give thermald time to read the param, or if just started give camerad time to start
|
||||
|
||||
Reference in New Issue
Block a user