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
Hot Topic (More than 8 Replies) Map() function warning message (Read 3418 times)
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Map() function warning message
Jun 22nd, 2018 at 4:10pm
Print Post  
I have a small test sketch that uses the map() function. In my VS 2017 I get a red line under the map() function saying there are no over loaded methods found. I think this might be a vmicro issue since I don't get this warning if I load the sketch into my Ardunio IDE itself.

Code (C++)
Select All
#include <Arduino.h>

void setup()
{
	const int16_t mapped = 123;
	int16_t value = map(mapped, 200, 3700, 0, 319);
}

void loop()
{

}
 

« Last Edit: Jun 22nd, 2018 at 4:13pm by RalphF »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Map() function warning message
Reply #1 - Jun 23rd, 2018 at 12:14pm
Print Post  
Hi,

The arduino ide doesn't have intellisense so you don't get any warnings in the code.

The intellisense and the build are two different things. Intellisense is less accurate than builds because we hijack the Visual Studio c++ intellisense system.

We can often improve it but it is very specific to each core so you need to say which board and core and you are using for intellisense reports.

Thanks
  
Back to top
IP Logged
 
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Re: Map() function warning message
Reply #2 - Jun 26th, 2018 at 3:56pm
Print Post  
I'm using the Teensy 3.2 board.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Map() function warning message
Reply #3 - Jun 26th, 2018 at 8:09pm
Print Post  
Do you understand this is an intellisense error and do you agree your project builds OK same as arduino ide?
  
Back to top
IP Logged
 
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Re: Map() function warning message
Reply #4 - Jun 26th, 2018 at 10:05pm
Print Post  
Yes, I agree.
  
Back to top
 
IP Logged
 
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Re: Map() function warning message
Reply #5 - Jun 26th, 2018 at 11:04pm
Print Post  
FYI with that other post I made re the pinMode(), I switched to the Teensy 3.6 (from the 3.2) and all the compile warnings went away. I'm not sure why that is the case.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Map() function warning message
Reply #6 - Jun 26th, 2018 at 11:16pm
Print Post  
Hi,

Are you reporting compiler warnings after clicking build or are you reporting intellisense errors?
  
Back to top
IP Logged
 
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Re: Map() function warning message
Reply #7 - Jun 26th, 2018 at 11:45pm
Print Post  
Under teensy 3.2 they were intellisense warnings and I could not do a successful compile.

When I switched to 3.6 the intellisense warnings went away and I could compile successfully.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Map() function warning message
Reply #8 - Jun 26th, 2018 at 11:48pm
Print Post  
Thanks

Please reproduce the error after switching on compiler>verbose and "show build properties"

Then post the output as .txt or email to info[at]visualmicro.com along with link to this post

Thanks
  
Back to top
IP Logged
 
RalphF
Junior Member
**
Offline


Posts: 29
Joined: Dec 2nd, 2016
Re: Map() function warning message
Reply #9 - Jun 27th, 2018 at 1:02am
Print Post  
Attached are the .txt files with the Teensy 3.2 compile fail and the Teensy 3.6 compile success. Same Sketch.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint