Automatically read the BAUDRATE from sketch. Works only in linux for now

This commit is contained in:
Sudar 2012-07-15 13:25:45 +05:30
parent eed8c52ffd
commit b74f2efbce

View file

@ -428,9 +428,8 @@ ifndef MONITOR_BAUDRATE
MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200) MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
ifeq ($(MONITOR_BAUDRATE),) ifeq ($(MONITOR_BAUDRATE),)
$(warning The monitor speed wasnt properly set. Set to 9600 by default)
$(shell sleep 1)
MONITOR_BAUDRATE = 9600 MONITOR_BAUDRATE = 9600
$(call show_config_variable,MONITOR_BAUDRATE,[ASSUMED])
else else
$(call show_config_variable,MONITOR_BAUDRATE,[DETECTED], (in sketch)) $(call show_config_variable,MONITOR_BAUDRATE,[DETECTED], (in sketch))
endif endif