gepd / Deviot

Sublime Text plugin for IoT development based in PlatformIO ecosystem (Arduino IDE)
Apache License 2.0
307 stars 56 forks source link

feature: support for boards serial mon dtr rts state #275

Open tablatronix opened 5 years ago

tablatronix commented 5 years ago

add support for serial monitor asserted dtr and rts state from boards.txt

generic.serial.disableDTR=true
generic.serial.disableRTS=true
http://docs.platformio.org/en/latest/userguide/cmd_device.html#platformio-device-monitor
Enable software flow control, default Off

--rts
Set initial RTS line state (0 or 1).

Could be customized in “platformio.ini” (Project Configuration File) using monitor_rts option.

--dtr
Set initial DTR line state (0 or 1).

Could be customized in “platformio.ini” (Project Configuration File) using monitor_dtr option.

I will test platformio.ini monitor_* support and see if it works first.

tablatronix commented 5 years ago

wait does deviot use pyserial and not pio device monitor ?

tablatronix commented 5 years ago

seems to work, but it has to be handled on the isavailable serial.open() call also

            self.serial.dtr = False
            if is_available(self.port):
                self.serial.open()
    serial.dtr = False

    try:
        serial.open()
gepd commented 5 years ago

wait does deviot use pyserial and not pio device monitor ?

Yes it does, it's faster than use PIO

seems to work, but it has to be handled on the isavailable serial.open() call also

So will be fine to have two options in the serial monitor menu to activate drt or rts?

tablatronix commented 5 years ago

ideally it would be tied to boards and use the boards file setting , but not sure how that would be tied togather or if it would add new limitations.

So keeping as a global option should be fine for now