Allow spaces in "Serial.begin (....)"

Close #190
This commit is contained in:
Pierre DAVID 2014-04-14 08:39:46 +02:00
parent b42d05d8b1
commit 826b49d0db

View file

@ -702,7 +702,7 @@ endif
ifeq ($(strip $(NO_CORE)),)
ifndef MONITOR_BAUDRATE
ifeq ($(words $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS)), 1)
SPEED = $(shell egrep -h 'Serial.begin\([0-9]+\)' $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS) | sed -e 's/[^0-9]//g'| head -n1)
SPEED = $(shell egrep -h 'Serial.begin *\([0-9]+\)' $(LOCAL_PDE_SRCS) $(LOCAL_INO_SRCS) | sed -e 's/[^0-9]//g'| head -n1)
MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
endif