mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 00:35:44 +08:00
Check IsTakingSnapshot is not set before starting snapshot
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