allow disabling collision detection
This commit is contained in:
parent
3bc9511d6f
commit
d036a3d3c7
|
@ -1,5 +1,5 @@
|
|||
from telemetrix_rpi_pico import telemetrix_rpi_pico
|
||||
from kuukar.kuukar_config import COLLISION_DETECTOR_PIN
|
||||
from kuukar.kuukar_config import COLLISION_DETECTOR_PIN, COLLISION_ENABLE
|
||||
|
||||
from kuukar.kuukar_lcd import lcd
|
||||
from kuukar.kuukar_leds import leds
|
||||
|
@ -8,7 +8,8 @@ class collision:
|
|||
self.mcu = mcu
|
||||
self.lcd = lcd
|
||||
self.leds = leds
|
||||
self.mcu.set_pin_mode_digital_input(COLLISION_DETECTOR_PIN, self.collision_handle)
|
||||
if COLLISION_ENABLE:
|
||||
self.mcu.set_pin_mode_digital_input(COLLISION_DETECTOR_PIN, self.collision_handle)
|
||||
|
||||
def collision_handle(self, data):
|
||||
val = data[2]
|
||||
|
|
|
@ -25,6 +25,7 @@ TURN_TIME_FS_90DEG_MS = 3000.0
|
|||
BEEPER_PIN = 15
|
||||
|
||||
COLLISION_DETECTOR_PIN = 16
|
||||
COLLISION_ENABLE = True
|
||||
|
||||
LEDS_DATA_PIN = 17
|
||||
LEDS_NUM = 15
|
||||
|
|
Loading…
Reference in New Issue