MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / __init__

Method __init__

python/ctrlboard/src/ctrlboard_hw/encoder.py:11–16  ·  view source on GitHub ↗
(self, enc_a: HardwareButton, enc_b: HardwareButton)

Source from the content-addressed store, hash-verified

9 through the i2c multiplexer + interrupt"""
10
11 def __init__(self, enc_a: HardwareButton, enc_b: HardwareButton):
12 self.enc_a = enc_a
13 self.enc_b = enc_b
14 self.pos = 0
15 self.state = 0b00000000
16 self.direction = 0
17
18 def update(self):
19 """Updates the internal attributes wrt. to the encoder position and direction."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected