Disable deadtime
This commit is contained in:
parent
a7c3d5f84d
commit
dd8a95b9fc
1 changed files with 6 additions and 6 deletions
|
|
@ -52,8 +52,8 @@ MOTOR_A0 = Pin(0, Pin.OUT, drive=Pin.DRIVE_0)
|
||||||
MOTOR_A1 = Pin(1, Pin.OUT, drive=Pin.DRIVE_0)
|
MOTOR_A1 = Pin(1, Pin.OUT, drive=Pin.DRIVE_0)
|
||||||
MOTOR_B0 = Pin(2, Pin.OUT, drive=Pin.DRIVE_0)
|
MOTOR_B0 = Pin(2, Pin.OUT, drive=Pin.DRIVE_0)
|
||||||
MOTOR_B1 = Pin(3, Pin.OUT, drive=Pin.DRIVE_0)
|
MOTOR_B1 = Pin(3, Pin.OUT, drive=Pin.DRIVE_0)
|
||||||
LED_DAT = Pin(6, Pin.OUT, drive=Pin.DRIVE_3)
|
#LED_DAT = Pin(6, Pin.OUT, drive=Pin.DRIVE_3)
|
||||||
LED_NP = neopixel.NeoPixel(LED_DAT, 6, timing=1, bpp=4)
|
#LED_NP = neopixel.NeoPixel(LED_DAT, 6, timing=1, bpp=4)
|
||||||
|
|
||||||
|
|
||||||
#do_connect()
|
#do_connect()
|
||||||
|
|
@ -69,10 +69,10 @@ def controlloop(last_start, next_action):
|
||||||
if debug:
|
if debug:
|
||||||
print('CTRL: ', last_start, next_action)
|
print('CTRL: ', last_start, next_action)
|
||||||
|
|
||||||
if time.ticks_diff(now, time.ticks_add(last_start, 100000)) < 0:
|
#if time.ticks_diff(now, time.ticks_add(last_start, 100000)) < 0:
|
||||||
if debug:
|
# if debug:
|
||||||
print(' DEADTIME -> ignore')
|
# print(' DEADTIME -> ignore')
|
||||||
return last_start
|
# return last_start
|
||||||
|
|
||||||
if next_action is None and time.ticks_diff(time.ticks_add(last_start, 601000), now) > 0:
|
if next_action is None and time.ticks_diff(time.ticks_add(last_start, 601000), now) > 0:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue