diff --git a/ExoMy_Software-master/gui/index.html b/ExoMy_Software-master/gui/index.html
index bea1ee9..0ddc9ad 100644
--- a/ExoMy_Software-master/gui/index.html
+++ b/ExoMy_Software-master/gui/index.html
@@ -1209,8 +1209,8 @@ function updateCameraFrameLayout() {
var portHeight = port.clientHeight;
if (!portWidth || !portHeight) return;
- var videoWidth = (video && video.naturalWidth) || 1280;
- var videoHeight = (video && video.naturalHeight) || 720;
+ var videoWidth = (video && video.naturalWidth) || 1296;
+ var videoHeight = (video && video.naturalHeight) || 972;
var aspectRatio = videoWidth / videoHeight;
var frameWidth = portWidth;
diff --git a/ExoMy_Software-master/scripts/exomy_admin_api.py b/ExoMy_Software-master/scripts/exomy_admin_api.py
index 6912dc8..a7c07e4 100644
--- a/ExoMy_Software-master/scripts/exomy_admin_api.py
+++ b/ExoMy_Software-master/scripts/exomy_admin_api.py
@@ -23,9 +23,7 @@ DRIVE_ESTIMATOR_CALIBRATION_FILE = os.path.join(
ROUTE_LIBRARY_FILE = os.path.join(
os.path.dirname(__file__), '..', 'config', 'route_library.json'
)
-CAMERA_SETTINGS_FILE = os.path.join(
- os.path.dirname(__file__), '..', 'config', 'camera_settings.json'
-)
+CAMERA_RUNTIME_SETTINGS_FILE = '/tmp/exomy_camera_settings.json'
MOTOR_TEST_LOCK = threading.Lock()
GPS_PORT_PATTERNS = [
'/dev/serial/by-id/*',
@@ -379,7 +377,7 @@ def normalize_camera_fps(value):
def read_camera_settings():
default_profile = get_default_camera_profile()
try:
- with open(CAMERA_SETTINGS_FILE, 'r', encoding='utf-8') as handle:
+ with open(CAMERA_RUNTIME_SETTINGS_FILE, 'r', encoding='utf-8') as handle:
payload = json.load(handle)
except (FileNotFoundError, json.JSONDecodeError, OSError, ValueError, TypeError):
return default_profile
@@ -410,7 +408,6 @@ def read_camera_settings():
def write_camera_settings(profile, fps):
profile = dict(profile)
fps = normalize_camera_fps(fps)
- os.makedirs(os.path.dirname(CAMERA_SETTINGS_FILE), exist_ok=True)
payload = {
'profile': profile['id'],
'width': profile['width'],
@@ -418,14 +415,14 @@ def write_camera_settings(profile, fps):
'fps': fps,
'updated_at': int(time.time()),
}
- with open(CAMERA_SETTINGS_FILE, 'w', encoding='utf-8') as handle:
+ with open(CAMERA_RUNTIME_SETTINGS_FILE, 'w', encoding='utf-8') as handle:
json.dump(payload, handle, indent=2, sort_keys=True)
handle.write('\n')
def read_camera_settings_version():
try:
- with open(CAMERA_SETTINGS_FILE, 'r', encoding='utf-8') as handle:
+ with open(CAMERA_RUNTIME_SETTINGS_FILE, 'r', encoding='utf-8') as handle:
payload = json.load(handle)
except (FileNotFoundError, json.JSONDecodeError, OSError, ValueError, TypeError):
return 0
diff --git a/ExoMy_Software-master/scripts/libcamera_mjpeg_server.py b/ExoMy_Software-master/scripts/libcamera_mjpeg_server.py
index 000c20d..357c746 100644
--- a/ExoMy_Software-master/scripts/libcamera_mjpeg_server.py
+++ b/ExoMy_Software-master/scripts/libcamera_mjpeg_server.py
@@ -13,7 +13,7 @@ LATEST_JPEG = None
LATEST_LOCK = threading.Lock()
PORT = 8081
-CONFIG_FILE = os.path.join(os.path.dirname(__file__), '..', 'config', 'camera_settings.json')
+RUNTIME_CONFIG_FILE = '/tmp/exomy_camera_settings.json'
DEFAULT_CAMERA_SETTINGS = {
'width': 1296,
'height': 972,
@@ -24,7 +24,7 @@ DEFAULT_CAMERA_SETTINGS = {
def load_camera_settings():
settings = dict(DEFAULT_CAMERA_SETTINGS)
try:
- with open(CONFIG_FILE, 'r', encoding='utf-8') as handle:
+ with open(RUNTIME_CONFIG_FILE, 'r', encoding='utf-8') as handle:
raw_settings = json.load(handle)
except (FileNotFoundError, json.JSONDecodeError, OSError, ValueError, TypeError):
return settings
diff --git a/index_upload_tmp.html b/index_upload_tmp.html
index 115eede..df16a2f 100644
--- a/index_upload_tmp.html
+++ b/index_upload_tmp.html
@@ -1209,8 +1209,8 @@ function updateCameraFrameLayout() {
var portHeight = port.clientHeight;
if (!portWidth || !portHeight) return;
- var videoWidth = (video && video.naturalWidth) || 1280;
- var videoHeight = (video && video.naturalHeight) || 720;
+ var videoWidth = (video && video.naturalWidth) || 1296;
+ var videoHeight = (video && video.naturalHeight) || 972;
var aspectRatio = videoWidth / videoHeight;
var frameWidth = portWidth;