Autocomplete feature in AVR Studio 5

25 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the video AVR Studio 5: How to use the Editor, the man uses a supposed autocomplete feature (without entering ctrl+enter) on AVR Studio 5. How can I enable it? I could not find it on google.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How can I enable it?
I would like to know that too, if it can be enabled then it can be DISABLED..which is what I would want to do. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someone knows the answer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pvrego wrote:
Someone knows the answer?

Someone knows.

Is there anyone at AVR who can answer this question? It's getting asked over at Stack Overflow, http://stackoverflow.com/questions/8191671 and nobody there knows the answer. This forum entry is the first match to a Google search for "AVR Studio 5 Autocomplete."

When you post an answer, please delete all of the posts in this forum entry except the question and the answer (including this one), so that we can clean up the noise have a nice, clean, canonical entry.

Thank you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't understand this thread. Auto-complete just works doesn't it?

See this video I recorded of my copy of AS5 auto-completing in a very similar way to the Atmel video. Is this not what you are talking about?

http://www.youtube.com/watch?v=6vKAp0wyDbs&feature=youtu.be

BTW that video recorded by CamStudio from RenderSoft which is absolutely brilliant for recording Windows. (I also converted it to a tight compression format using VirtualDub for upload to Youtube).

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I don't understand this thread. Auto-complete just works doesn't it?

See this video I recorded of my copy of AS5 auto-completing in a very similar way to the Atmel video. Is this not what you are talking about?

http://www.youtube.com/watch?v=6vKAp0wyDbs&feature=youtu.be

This doesn't happen with my AVR Studio. I have to enter CNTRL+SPACE for the completion to come when typing the names (but it works for "." typing). Did you type this on the video? It looks like it, because the "autocomplete" has a delay when compared to typing speed. If this is the case, it's not automatic.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

robertwharvey wrote:

Someone knows.

Well, I'd like to be one of this "someone" list hehe.

robertwharvey wrote:

When you post an answer, please delete all of the posts in this forum entry except the question and the answer (including this one), so that we can clean up the noise have a nice, clean, canonical entry.

I'm sure you have noticed that we cannot (and neither should) delete other's people posts. Sorry.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Before I recorded that video I did do a couple of "dry runs" to decide what I was going to type to show it in action. It seems to me that there may be some form of "caching" involved because the first time I started to type ADCSRA (for example) I'd actually got as far as about ADCSR before the auto-complete appeared. Yet when I did it the second or third time I didn't have to type much more than ADC before the options including ADCSRA appeared.

The "mystring" on the other hand was virtually instantaneous. I only typed about "my" when it popped up the "mystring" suggestion.

So it does look like it has to go away and parse the .h files when you first start to type but I imagine that once it has read io.h and (in this case, because I was writing for mega16) iom16.h, then further "look ups" happen much quicker.

I also thought at first that maybe it would only work if the file already contained a #include that would lead to the symbol definition so before I recorded the video I had:

#include 

(because I was thinking of using printf()) and I also had:

#include 

as I planned to use strlen() in the example. But as a test to see if it was dependent on the #include's being present I later removed both of them from the file and yet it would still auto-complete. However what I didn't check was whether it was because I HAD those previously and it had cached the .h contents that they still subsequently worked. I guess I should have tried an example from a .h file that was never #include'd and see if it would be found anyway.

EDIT: actually I just went back and tried that. Intending to use cosh() from I started (slowly!) typing 'c','o','s','h' but it did not autocomplete though when I typed:

float f;

I only got as far as the "fl" before the rest appeared.

As a further test I then when back to the top of the file and typed:

#include <

on typing the '<' it automatically provided the closing '>'

#include <>

and I only got as far as typing:

#include 

when it popped up "math.h" as a suggestion - which I took by hitting [Enter].

Having added that #include I then started to type the line:

f = cos

At that point it colour highlighted the "cos" (which it didn't do previously) to show that it was a recognised function - but there was no auto-complete. However when I typed the 'h', that is:

f = cosh

it popped up a window with the two suggestions "cosh()" and "coshf()". I hit [Enter] with the highlight on cosh and it complete it with opening and closing parenthesis (rather curiously split over two line??).

So, yes, auto-complete works but I think you have to make sure you have the right #include's in place for it to be able to wok (which I guess makes sense, otherwise, amongst hundreds of .h in the library which one(s) would it chose?).

I guess what you could do if you don't know which .h various library functions live in is to start every file with:

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

to make sure you have all the bases covered! ;-)

Cliff

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fun piece of trivia: those AS5 usage videos were actually recorded in Atmel Norway by a coworker while I was working there, and then re-dubbed by the marketing team before pushing them out to production. I'm actually the typist on one or two videos (I forget which). You'll know I'm the one because there's a few typos the person makes during the explanation -- I was typing English into a Norwegian keyboard, which follows the English UK physical layout and not the English US layout we Australians use. Drove me mental during my stay, so this time I'm bringing my own keyboard.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My wife's laptop is the opposite - all other laptops and computers here are UK keyboards but we bought her laptop while on holiday in the States and it has a US keyboard. It bugs the living daylights out of me trying to touch type at my normal speed on it!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

which I guess makes sense, otherwise, amongst hundreds of .h in the library which one(s) would it chose?)

And even more to the point: If you have two (non-system) header files with two separate functions named foo, which one is it going to suggest?

Suggesting functions from e.g. header files that have not been included makes little sense, and would be "technically awkward".

And it would probably drive me mad. :D

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

Pages