Spaces:
Build error
Build error
Yann Bouteiller commited on
Commit ·
0c284d8
1
Parent(s): 924fe54
Fixed bug and retested and validated BIAS
Browse files- portiloop/capture.py +4 -11
portiloop/capture.py
CHANGED
|
@@ -61,9 +61,9 @@ FRONTEND_CONFIG = [
|
|
| 61 |
0x3E, # ID (RO)
|
| 62 |
0x95, # CONFIG1 [95] [1, DAISY_EN(bar), CLK_EN, 1, 0, DR[2:0]] : Datarate = 500 SPS
|
| 63 |
0xC0, # CONFIG2 [C0] [1, 1, 0, INT_CAL, 0, CAL_AMP0, CAL_FREQ[1:0]]
|
| 64 |
-
|
| 65 |
0x00, # No lead-off
|
| 66 |
-
|
| 67 |
0x60, # CH2SET
|
| 68 |
0x60, # CH3SET
|
| 69 |
0x60, # CH4SET
|
|
@@ -1376,15 +1376,8 @@ class Capture:
|
|
| 1376 |
point = p_data_i.recv()
|
| 1377 |
else:
|
| 1378 |
continue
|
| 1379 |
-
|
| 1380 |
-
|
| 1381 |
-
avg = 0
|
| 1382 |
-
for idx, p in enumerate(point):
|
| 1383 |
-
if idx > 0 and idx < 5:
|
| 1384 |
-
avg += p
|
| 1385 |
-
new_point[0] = avg // 4
|
| 1386 |
-
new_point[5] = new_point[1] - new_point[0]
|
| 1387 |
-
n_array = np.array([new_point])
|
| 1388 |
n_array = filter_np(n_array)
|
| 1389 |
|
| 1390 |
if filter:
|
|
|
|
| 61 |
0x3E, # ID (RO)
|
| 62 |
0x95, # CONFIG1 [95] [1, DAISY_EN(bar), CLK_EN, 1, 0, DR[2:0]] : Datarate = 500 SPS
|
| 63 |
0xC0, # CONFIG2 [C0] [1, 1, 0, INT_CAL, 0, CAL_AMP0, CAL_FREQ[1:0]]
|
| 64 |
+
0xFC, # CONFIG3 [E0] [PD_REFBUF(bar), 1, 1, BIAS_MEAS, BIASREF_INT, PD_BIAS(bar), BIAS_LOFF_SENS, BIAS_STAT] : Power-down reference buffer, no bias
|
| 65 |
0x00, # No lead-off
|
| 66 |
+
0x62, # CH1SET [60] [PD1, GAIN1[2:0], SRB2, MUX1[2:0]] set to measure BIAS signal
|
| 67 |
0x60, # CH2SET
|
| 68 |
0x60, # CH3SET
|
| 69 |
0x60, # CH4SET
|
|
|
|
| 1376 |
point = p_data_i.recv()
|
| 1377 |
else:
|
| 1378 |
continue
|
| 1379 |
+
|
| 1380 |
+
n_array = np.array([point])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1381 |
n_array = filter_np(n_array)
|
| 1382 |
|
| 1383 |
if filter:
|