pins: Strip pin names before trying to parse them

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-06-30 14:05:27 -04:00
parent 0cbfcfd3d1
commit 53b718a621
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ class PrinterPins:
def lookup_pin(self, pin_type, pin_desc, share_type=None):
can_invert = pin_type in ['stepper', 'endstop', 'digital_out', 'pwm']
can_pullup = pin_type == 'endstop'
desc = pin_desc
desc = pin_desc.strip()
pullup = invert = 0
if can_pullup and desc.startswith('^'):
pullup = 1