Deepcopy default tuning file so it isn't affected by calibration.
This commit is contained in:
parent
469562df4b
commit
ab0bece70b
1 changed files with 2 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ from datetime import datetime
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import copy
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
@ -138,7 +139,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
# Set tuning to default tuning. This will be overwritten when the Thing is
|
# Set tuning to default tuning. This will be overwritten when the Thing is
|
||||||
# connects to the server if tuning is saved to disk.
|
# connects to the server if tuning is saved to disk.
|
||||||
try:
|
try:
|
||||||
self.tuning = self.default_tuning
|
self.tuning = copy.deepcopy(self.default_tuning)
|
||||||
except NotConnectedToServerError:
|
except NotConnectedToServerError:
|
||||||
# This will throw an error after setting as we are not connected to
|
# This will throw an error after setting as we are not connected to
|
||||||
# a server. But we know this, so we ignore the error.
|
# a server. But we know this, so we ignore the error.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue