Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic monitor/watch an ARRAY of several fields? (Read 2995 times)
Gueraud
Newbies
*
Offline


Posts: 5
Location: Paris
Joined: Feb 21st, 2014
monitor/watch an ARRAY of several fields?
May 19th, 2014 at 1:30pm
Print Post  
Hello, 

Is it possible to monitor/watch an ARRAY of several fields ?  
If so, how ? 
Thanks for reply and advice about this subject. 

Henri
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: monitor/watch an ARRAY of several fields?
Reply #1 - May 19th, 2014 at 1:39pm
Print Post  
Hi,

I am sorry but we don't support auto enumeration of arrays yet but that is planned for a future release possibly later this year.

In the meantime the best you can do is either enter the watch expressions long hand {ar[0]}{ar[1]}

Or call your own function that returns a string from the array such as {debugPrintMyArray()}

Code
Select All
string debugPrintMyArray()
{
    //return myArrayAsString

    // or you can use Serial.print(myArray[i]); Serial.print(";");Serial.print(myArray[i++]); Serial.print(";")
    // return "";
} 



I know that using a function like this is a bit crude but when debug is OFF the function will be ignored so won't present a memory overhead. 

Does this make sense?
« Last Edit: May 19th, 2014 at 1:40pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint