Go Down

Topic: Port Confirmation Prompt for Upload? (Read 946 times) previous topic - next topic

btkramer

Is there a way to enable a prompt confirming the upload port after pressing the upload button in the Arduino IDE?

i.e, after pressing the upload button, having a prompt pop up saying "Upload to COM3?" or "Upload to 192.168.X.X?", or whatever is currently selected

This becomes an issue when you have multiple devices on the network with OTA sketches and you accidentally send a non-OTA sketch to a remote installed OTA device.

spycatcher2k

No - But why would you do such a silly thing? Why not get into the habit of checking twice before uploading anything to any device.
Mrs Drew
-=-
UK Based PCB Manufacturing - PM for details
I will design & code for you, but I will also charge you (PM me)
Use Google or search this site BEFORE asking!

btkramer

#2
May 24, 2020, 01:51 pm Last Edit: May 24, 2020, 04:57 pm by btkramer
I am in the habit of checking. 99% of the time, I do. Are you confident you would never, ever forget to check in any situation, 100% of the time? Doubtful.

I was working on a non-OTA project this morning on my bench, uploading, testing and modifying repeatedly. In such situations, you tend to stop checking the port each and every time you hit upload. While I was working on this project, a minor issue arose with a remote installed OTA enabled device which I quickly made a change to and uploaded. I then got distracted by unrelated events, and when I got back to my bench project I had forgotten about modifying the OTA project and accidentally sent my non-OTA sketch to my remote device. I then had to crawl back and forth through my attic twice to fix it.

A simple prompt dialog, which could be enabled or disabled in preferences could have saved me a good bit of time and could be very easily added to the IDE. I am likely not the first person this has happened to.

The real question is why you would not want to at least have the option?

sterretje

#3
May 24, 2020, 02:22 pm Last Edit: May 24, 2020, 02:30 pm by sterretje
I think that a last confirmation (that one can enable) can be useful.

On the other hand, I will probably automatically click it away with a "yeah, I know". Or disable it again as being an annoyance.

So if something like this is implemented, it should e.g. only prompt when a new sketch is loaded in the IDE or the port/whatever is changed.

PS: There is a suggestion box. You can ask a moderator to move your suggestion there.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

btkramer

#4
May 24, 2020, 03:01 pm Last Edit: May 24, 2020, 04:53 pm by btkramer
What about if the IDE opened any new sketch with no port settings selected (as opposed to retaining the previously used port setting, as it is now) and requires you to select a port for every new sketch? It would then remember the port setting as being associated with that particular sketch and only prompt for confirmation if the port gets changed, or is unavailable thereafter.

I think this becomes more of an issue when you have multiple MCUs on the network with OTA, so some users may never encounter the problem.

I can tell you that after this morning, I would never get annoyed with a confirmation prompt for my port setting again. It only needs to happen once in an inconvenient circumstance and you will be happy for it every time you see it.

Thanks for the suggestion suggestion. What do you think of the method I proposed above?

Go Up