Skip to content

Commit ca1f0c1

Browse files
committed
Reset AnalogInput gain on initialization
1 parent 4d7537a commit ca1f0c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PSL/achan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,18 @@ class AnalogInput:
7979
def __init__(self, name: str, device: packet_handler.Handler):
8080
self._name = name
8181
self._device = device
82+
self._resolution = 2 ** 10 - 1
8283

8384
if self._name == "CH1":
8485
self._programmable_gain_amplifier = 1
86+
self.gain = 1
8587
elif self._name == "CH2":
8688
self._programmable_gain_amplifier = 2
89+
self.gain = 1
8790
else:
8891
self._programmable_gain_amplifier = None
92+
self._gain = 1
8993

90-
self._gain = 1
91-
self._resolution = 2 ** 10 - 1
9294
self.samples_in_buffer = 0
9395
self.buffer_idx = None
9496
self._scale = np.poly1d(0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy