From 6c4bc57713fe3d43edc4009b9d737c45dd7fa7ba Mon Sep 17 00:00:00 2001
From: Leo Sutevski <lsutevski@ethz.ch>
Date: Fri, 12 May 2023 13:32:57 +0200
Subject: [PATCH] .

---
 cam_control/MemoryBackend.py  | 4 +++-
 cam_control/intitialConfig.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cam_control/MemoryBackend.py b/cam_control/MemoryBackend.py
index 8439064..46c9540 100644
--- a/cam_control/MemoryBackend.py
+++ b/cam_control/MemoryBackend.py
@@ -211,7 +211,9 @@ class MemoryFrame:
         '''Takes in an numpy array and converts it into grayscale image and encodes into base64'''
         
         #t = time.time()  
-        arr = (self._readFrame()*255//1023).astype(np.uint8)
+        arr = self._readFrame()
+        arr = arr * 255 // np.max(arr)
+        #arr = (self._readFrame()*255//1023).astype(np.uint8)
         #t1 = time.time()
         
 
diff --git a/cam_control/intitialConfig.py b/cam_control/intitialConfig.py
index 18115fb..9ec6b2a 100644
--- a/cam_control/intitialConfig.py
+++ b/cam_control/intitialConfig.py
@@ -121,7 +121,7 @@ initial2 = {
     '0x304b' : 0x0A,
     '0x3445' : 0x25,
     '0x3444' : 0x20,
-    '0x301a' : 0x00,
+    '0x301a' : 0x03,
     '0x3019' : 0xFF,
     '0x3018' : 0xFF,
     '0x3007' : 0x00,
-- 
GitLab