Enhance IR control functionality and configuration
- Updated angle_minus value in config.json for switch calibration. - Added support for seminsu devices in load_seminsus function. - Implemented polling logic for seminsu devices in main.py. - Adjusted switch position representation from "-" and "+" to "1" and "0". - Introduced IRRxTxPollPair class for IR communication in ir_pair.py. - Created ir_test.py for testing IR functionality with configurable parameters.
This commit is contained in:
@@ -8,13 +8,13 @@ class Switch:
|
||||
self.angle_minus = angle_minus
|
||||
self.angle_plus = angle_plus
|
||||
self.servo = Servo(pin)
|
||||
self.pos = "-"
|
||||
self.pos = "1" # 1 - минус, 0 - плюс
|
||||
self.set_minus()
|
||||
|
||||
def set_minus(self):
|
||||
self.servo.angle(self.angle_minus)
|
||||
self.pos = "-"
|
||||
self.pos = "1"
|
||||
|
||||
def set_plus(self):
|
||||
self.servo.angle(self.angle_plus)
|
||||
self.pos = "+"
|
||||
self.pos = "0"
|
||||
Reference in New Issue
Block a user