[MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC

sufyan785:
does this support arduino due ?

No, this is the version 1.0.4

Any chance of you being able to add line numbers to the code window? Or is that beyond what you're able to change in the IDE?

Great job! But one question though. Mine is duemilanove w/328p, when I tried upload a sketch, it said "avrdude.exe: stk500_getsync(): not in sync: resp=0x00". But in fact I got the same message while uploading with official IDE 1.0 or above. On the contrary, I received no error message if using 0023 IDE. Do you happen to know how to fix it? I know it is nothing related to your program, but this problem has been troubling me.

karl_eller:
Any chance of you being able to add line numbers to the code window? Or is that beyond what you're able to change in the IDE?

It is possible as a hack I think. It depends on how much is wanted by the users :smiley:

ttttkk:
Great job! But one question though. Mine is duemilanove w/328p, when I tried upload a sketch, it said "avrdude.exe: stk500_getsync(): not in sync: resp=0x00". But in fact I got the same message while uploading with official IDE 1.0 or above. On the contrary, I received no error message if using 0023 IDE. Do you happen to know how to fix it? I know it is nothing related to your program, but this problem has been troubling me.

Hi, there is another item in the boards called "duemilanove w/328" without the "p" can you test that one?

eried:

karl_eller:
Any chance of you being able to add line numbers to the code window? Or is that beyond what you're able to change in the IDE?

It is possible as a hack I think. It depends on how much is wanted by the users :smiley:

I guess, count this as vote #2. (I haven't checked if one can print from the IDE, I'm not near my PC at the moment. But if printing is there please also add line numbering there as well. If that is too hard, I can always print with line numbers from PSPad...)

Enried, I want to take this chance to publicly thank you for a really valuable addition to the IDE and as much as I would love line numbers... I can wait until it happens, quietly now....

Doc

Two enhancements that I'd like to request (in addition to line numbers in the sketch area):

  • Make the cursor movement to the end of the loop() function optional.
  • When it is configured to auto-open the Serial Monitor, have it scan the source for Serial.begin() and automatically set the Serial Monitor's baud rate to match. This should probably also be optional.

Thanx.

Docedison:
Enried, I want to take this chance to publicly thank you for a really valuable addition to the IDE and as much as I would love line numbers... I can wait until it happens, quietly now....

Doc

Cool, it seems everyone wants line numbers :stuck_out_tongue: I will experiment a bit with that to see what can I add.

Sembazuru:
Two enhancements that I'd like to request (in addition to line numbers in the sketch area):

  • Make the cursor movement to the end of the loop() function optional.
  • When it is configured to auto-open the Serial Monitor, have it scan the source for Serial.begin() and automatically set the Serial Monitor's baud rate to match. This should probably also be optional.

Thanx.

What do you mean with: "Make the cursor movement to the end of the loop() function optional"? Should I add a way to disable that (currently moves the cursor to the end of the setup when opening a sketch)? or add the possibility to switch between end of loop or setup functions?

About the serial speed, since it is kinda linked to 'automatic com port selection' and that feature is like a general suggestion for the IDE I was waiting something 'official' related with this. Will take a look into this too anyway.

For the moment, things I will try to look:

  1. Upload any hex file (this is pretty ready right now*, but still not fully working)
  2. Serial speed automatic detection from the source
  3. Line numbers

eried:

Sembazuru:
Two enhancements that I'd like to request (in addition to line numbers in the sketch area):

  • Make the cursor movement to the end of the loop() function optional.
  • When it is configured to auto-open the Serial Monitor, have it scan the source for Serial.begin() and automatically set the Serial Monitor's baud rate to match. This should probably also be optional.

Thanx.

What do you mean with: "Make the cursor movement to the end of the loop() function optional"? Should I add a way to disable that (currently moves the cursor to the end of the setup when opening a sketch)? or add the possibility to switch between end of loop or setup functions?

Yeah, sorry about the confusion. When writing this I had forgotten where the cursor automatically went to. My request is to optionally totally disable it. (I know you use it as a selling feature, but I don't care for it. Just IMHO.) Maybe make it a pull-down with any or all of these 5 options: None, beginning of setup, end of setup (default), beginning of loop, end of loop.

Thank you again for this enhancement. Other than this behavior I enjoy your enhancements.

I like your enhanced IDE 1.0.4 but it frequently quits an upload with an error message like "avrdude.exe not in sync." The IDE usually shows the wrong or no com port when this happens. I never had this error on the stock 1.0.4.

I am using ERW 1.0.4 with an Uno rev. 3 on a Win 7 32-bit computer. A friend has the same issue on an XP machine.

Thanks,
Karl

Sembazuru:

eried:

Sembazuru:
Two enhancements that I'd like to request (in addition to line numbers in the sketch area):

  • Make the cursor movement to the end of the loop() function optional.
  • When it is configured to auto-open the Serial Monitor, have it scan the source for Serial.begin() and automatically set the Serial Monitor's baud rate to match. This should probably also be optional.

Thanx.

What do you mean with: "Make the cursor movement to the end of the loop() function optional"? Should I add a way to disable that (currently moves the cursor to the end of the setup when opening a sketch)? or add the possibility to switch between end of loop or setup functions?

Yeah, sorry about the confusion. When writing this I had forgotten where the cursor automatically went to. My request is to optionally totally disable it. (I know you use it as a selling feature, but I don't care for it. Just IMHO.) Maybe make it a pull-down with any or all of these 5 options: None, beginning of setup, end of setup (default), beginning of loop, end of loop.

Thank you again for this enhancement. Other than this behavior I enjoy your enhancements.

Any particular reason why don't you like that? You prefer the cursor in the position 0?

pinback:
I like your enhanced IDE 1.0.4 but it frequently quits an upload with an error message like "avrdude.exe not in sync." The IDE usually shows the wrong or no com port when this happens. I never had this error on the stock 1.0.4.

I am using ERW 1.0.4 with an Uno rev. 3 on a Win 7 32-bit computer. A friend has the same issue on an XP machine.

Thanks,
Karl

Are you sure about this? can you test side by side the mod vs the original and take a screencast or picture? I can't do a lot with that description, for me, and other people the updated avr tools included works much better, so if you experience issues I don't even know where to start fixing something :fearful:

eried:

Sembazuru:

eried:

Sembazuru:
Two enhancements that I'd like to request (in addition to line numbers in the sketch area):

  • Make the cursor movement to the end of the loop() function optional.
  • When it is configured to auto-open the Serial Monitor, have it scan the source for Serial.begin() and automatically set the Serial Monitor's baud rate to match. This should probably also be optional.

Thanx.

What do you mean with: "Make the cursor movement to the end of the loop() function optional"? Should I add a way to disable that (currently moves the cursor to the end of the setup when opening a sketch)? or add the possibility to switch between end of loop or setup functions?

Yeah, sorry about the confusion. When writing this I had forgotten where the cursor automatically went to. My request is to optionally totally disable it. (I know you use it as a selling feature, but I don't care for it. Just IMHO.) Maybe make it a pull-down with any or all of these 5 options: None, beginning of setup, end of setup (default), beginning of loop, end of loop.

Thank you again for this enhancement. Other than this behavior I enjoy your enhancements.

Any particular reason why don't you like that? You prefer the cursor in the position 0?

Probably just me (which is why I was asking for it to be an option, not the default...). The top of my sketch(/script/source/etc...) is usually a bit informative, and the top of (well written) examples are usually very informative. I like to see what I'm about to work in case I forgot what I was doing while it loaded. (I've been told I have a short atten... oooohhh... butterfly...) :wink: (And a creature of habit... I can't seem to stop typing the noses on my smilies because that's how I learned them back pre-WWW days...) :wink:

Also, much like a robot, I like to start at "home". When opening up a sketch and the IDE jumps to the middle somewhere, I'm lost. Currently it really isn't that big of a deal. I just scroll to the top, and then I know where I am. (Yes, I'm really that simple.) :stuck_out_tongue:

OK, no worries, I will add the option to change the behaviour on the preferences, it is super easy to do. I just was puzzled about what was the reason. I think the perfect solution would be to replicate Visual Studio behaviour: exact same position/layout when you left, but the ino files don't have any metadata to use, so best second option was this one in my opinion.

I wonder how Windows 8 hitted(/will hit) your habits hehehe (I am pretty adaptable, but 8 is the first OS that changed a lot my ways to do everything, since Win 95 OSR2!)

eried:
OK, no worries, I will add the option to change the behaviour on the preferences, it is super easy to do. I just was puzzled about what was the reason. I think the perfect solution would be to replicate Visual Studio behaviour: exact same position/layout when you left, but the ino files don't have any metadata to use, so best second option was this one in my opinion.

I wonder how Windows 8 hitted(/will hit) your habits hehehe (I am pretty adaptable, but 8 is the first OS that changed a lot my ways to do everything, since Win 95 OSR2!)

Heh... That's a "will hit" my habits... I'm kinda dreading it. I but I don't expect it as bad as when I moved from AmigaOS to MSWin... :confused: (I still miss things from the Amiga days. Logical assignments, an actually useful RAM: disk, the intelligent datatype system for filetype identification, and a few others that I can't recall off the top of my head but still rub me the wrong way when I encounter them...) But I think I'm starting to drift a bit off topic here.

I would like the cursor to start at the top of the sketch as well.

I never realised that it was jumping to the start of the loop section - I just knew that it wasn't at the top :slight_smile: I assumed that it had something to do with when I saved the sketch but apparently not.

OK, here is a temporal file that adds that preference (file/preferences) to move the caret to position 0. Just replace the pde file from c:\program files (x86)\arduino...

I will build the full setup after testing adding line numbers and making the upload hex work, but I am not sure how long that will take.

Also, attached is a preliminary version of the line numbers, should they have some line or special coloring area? I am yet unsure how to handle bigger numbers, right now the "dynamic" offset is buggy but a smooth one will be a bit more resource intensive (calculating the length of the last line number when scrolling):

pde.jar (814 KB)

pde-line_numbers_experimental.zip (777 KB)

Why not allot 3 spaces as a permanent margin?. A left justified number is certainly no less visible than any other. I would think that 999 lines of comments, fonts and/or whatever should be enough for anyone. While you're at it you might fix that behavior that causes the scroll wheel to close the boards list or any list for that matter...

Doc

Docedison:
Why not allot 3 spaces as a permanent margin?. A left justified number is certainly no less visible than any other. I would think that 999 lines of comments, fonts and/or whatever should be enough for anyone. While you're at it you might fix that behavior that causes the scroll wheel to close the boards list or any list for that matter...

Doc

Drat... I thought I had the answer to do a quick pre-scan of the file being opened and allocate enough digits. But that doesn't take into account what happens when entering a line in the middle somewhere that increases the total line number quantity from 99 to 100... Maybe a re-scan and adjust if needed every time a new line is created and destroyed?

I'm not sure exactly how my favorite text editor (PSPad) does it. I just opened two randomly chosen ASCII files in PSPad, one with 11095 lines, and the other with 6 lines. In both, the background of the line-number area is light gray, and the numbers are left-justified within that area. For the file with 11095 lines, the line number area is 5 characters wide no matter where one looks at the file. The file with 6 lines has the line number area 2 characters wide. Unfortunately, while PSPad is freeware, it isn't open source so I doubt you could take a look under the hood to see how it handles changing quantity of line number digits.

BTW, I do like how in your screenshot you have lines that have nothing but comments in them the line number is colored the same as the comment. Not something that PSPad does, so that is something you are doing that is better than my favorite text editor... :smiley:

Now to install your temp files to help beta these enhancements.

Playing with your experimental line numbers pde.jar (I took a quick look at it in a HEX viewer, but didn't notice anything obviously a revision number in the first FF bytes. This one (for future reference) is 833,721 bytes long. Shall we call it line_number_beta01?)

Horizontal scrolling is broken. (Oops...)

As I mentioned before I like the changing of line numbers for lines with comments. But with for one of my actual sketches where I have some lines that are comments only and some lines that have a comment after a bit of code, the line numbers are all comment color. I'm kind of torn here. The current way helps highlight where the comments are, but when scanning code to try to find the line number where the error code is it is easier to skip over the greyed out line numbers. I'd like to suggest that the line number only changes to grey (or whatever the comment syntax highlighting color is) when the only contents of the line is a comment. But what about scanning the code just to find comments. Which is more important? Not sure how to decide this.

Oh... I just figured out how you did the coloration of the line numbers. It matches the syntax highlighting of the last character of the line. Clever. I think it might make more sense to use the syntax colorization of the first non-white-space character of the line... Dunno. That would be a judgement call based on playing with both techniques. (Though the current method, except for comments, might help highlight lines where one forgot to end it with a semi-colon. It wouldn't catch all of them, but might catch some...)

I think I do prefer left-justified line numbers, but that is just a very minor concern. I wouldn't think less of this effort because of the line number justification. I just think it is easier to see way down in the code which is the top level closing bracket when closing nested blocks if there is always 1 space between the line numbers and the code.

It's tough to tell (I hate counting multiple white-space characters, can't tell one from the other...), but it looks like you have 4 characters allocated for line numbers. When I went over 5-6000 lines I saw the line number area increase by 1 character to make room for 5 digit line numbers (at that point I was just pasting blocks of 1000 lines of garbage characters to test the line numbering). A bit of fine tuning and I found the jump happened when I pressed return to create new line number 5013. Not a criticism, just a comment on my experimentation so you can verify that it does or doesn't work as planned. :wink: Starting with 5001 lines and inserting blocks of 1000 lines at the beginning of the file didn't get the extra digit added to the line number area until the third paste (expected it on the first paste of 1000 lines). Still not a problem, but might point to a small instability somewhere.

Except for the horizontal scrolling not working, I haven't run into any actual bugs yet. I checked the "option to not move the carat" pde.jar and the horizontal scrolling works there. I hope this helps.

Thanks for the feedback Sembazuru. The coloring thing is purely non-intentional because I am 'hacking' the paint routine, so it automatically presets the coloring.

I tried to include the line numbering system from jEdit (Arduino IDE pane is based on jEdit controls, and jEdit right now is light years away with enhanced scroll, collapsive blocks, numbers, etc) but due the dependencies it is a major rebuild to update that panel. So what you tested it is a very quick and dirty attempt (1 hr or so).

So I still I am unsure how to handle the line number space, dynamic or static. I think the style of the panel can be added to the theme folder maybe (like background color, number color). Also will check the horizontal scroll, didn't noticed that, and it seems be very important due the way this hack works. It might need to do another trick like moving the textpane a little to the right, not inserting the numbers inside the text and sync both controls.