IDE v1.6.13 VERIFY/COMPILE Errors

Forum for posting topics and questions about anything.
Post Reply
RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

IDE v1.6.13 VERIFY/COMPILE Errors

Post by RetroBoy » Tue Jul 12, 2022 5:03 pm

Hello Andrew,

Have UPDATED IDE to v1.6.13 ... now getting even more stupid/silly errors - well WARNINGS !
Any help appreciated.
-----------------------------------------------------------------------------------------------------------------------
const char DT_Seps[] = {0b11110011,'\0'}; // Date Separator // Value = 243
const char TM_Seps[] = {0b00111010,'\0'}; // Time Separator // Value = 58 <------ !!! THIS IS OK !!!
const char Omega[] = {0b11110100,'\0'}; // Omega, Sigma,Theta // Value = 244
const char Sigma[] = {0b11110110,'\0'}; // used for Barometer // Value = 246
const char Theta[] = {0b11110010,'\0'}; // and Hygrometer // Value = 242
-----------------------------------------------------------------------------------------------------------------------

C:\Documents and Settings\Pc-User\My Documents\Arduino\libraries\TinyGPSPlus-1.0.3\src/Own_Data.h:125:49:
warning: narrowing conversion of '243' from 'int' to 'const char' inside { } [-Wnarrowing]

const char DT_Seps[] = {0b11110011,'\0'}; // Date Separator
^

C:\Documents and Settings\Pc-User\My Documents\Arduino\libraries\TinyGPSPlus-1.0.3\src/Own_Data.h:127:49:
warning: narrowing conversion of '244' from 'int' to 'const char' inside { } [-Wnarrowing]

const char Omega[] = {0b11110100,'\0'}; // Omega, Sigma,Theta
^

C:\Documents and Settings\Pc-User\My Documents\Arduino\libraries\TinyGPSPlus-1.0.3\src/Own_Data.h:128:49:
warning: narrowing conversion of '246' from 'int' to 'const char' inside { } [-Wnarrowing]

const char Sigma[] = {0b11110110,'\0'}; // used by Barometer
^

C:\Documents and Settings\Pc-User\My Documents\Arduino\libraries\TinyGPSPlus-1.0.3\src/Own_Data.h:129:49:
warning: narrowing conversion of '242' from 'int' to 'const char' inside { } [-Wnarrowing]

const char Theta[] = {0b11110010,'\0'}; // and Hygrometer
^
For some reason the Text Spacing is not working; so to explain

The carat ' ^ ' should be pointing to the closing Brace ' } '

Sketch is compiling but I get 'funny' characters for what should have been defined.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: IDE v1.6.13 VERIFY/COMPILE Errors

Post by andrew » Wed Jul 13, 2022 7:51 am

The compiler is complaining is because it is having to take an integer value and then try and store it in an array of type ‘char’. On an Arduino char is normally handled as an 8-bit signed value ranging from -127 to +127. So any value above 127 will be converted to a negative number when stored in the array. This is why it’s complaining about some of the numbers but not the one(s) below 128.

Tbh, so long as what’s using those values treats them as an unsigned integer it should just convert them back to the original value (so long as the original value is below 256). So I’m not sure if this would be the cause of your problem and why it’s just a warning and not an error. In fact, unless the compiler in your older version of the IDE treated chars as unsigned 8-bit, then it’d expect that it would have had the same issue but probably just didn’t bother reporting it as a warning.

If you want to suppress the warnings you could try declaring your character arrays as unsigned chars like this:

  1. const unsigned char DT_Seps[] = {0b11110011,'\0'}; // Date Separator // Value = 243

As I say, it probably won't fix your issue, just get rid of the warnings. I think the problem you have is that you're going to have to port what looks to be a 9 year old library to work with a newer version of the IDE. If you have no luck, and as you're looking to move over to the ESP32 is a more up-to-date GPS library now an option?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: IDE v1.6.13 VERIFY/COMPILE Errors

Post by RetroBoy » Wed Jul 13, 2022 8:07 am

Good Morning Andrew,

That's what I originally thought. V1.0.6 & v1.6.9 had no issues, only since v1.6.13.
I also tried v1.8.9 - no go - Java complained and expected 64bit processor ( IDE worked, but no verify/compile ).
I only went to v1.6.13 to be able to get the ESP32 Board recognized - OK; have not tried anything yet ( too busy getting the actual prog finished ). TBH I have already run out of memory on a NANO ( returned error 5 on capture2.exe ), MEGA is OK at present.

Will give it a go using unsigned, and carry on.

Thanks.

RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: IDE v1.6.13 VERIFY/COMPILE Errors

Post by RetroBoy » Wed Jul 13, 2022 7:25 pm

Good Evening Andrew,

A follow on from this AM. Using ' unsigned ' caused even more errors, especially for SmartLCD 'Print' routines.

However, Came up with a solution - no compile errors - not yet tried as need to create new 'Board' to house the sensors for the ESP32. Code below, if you think of any issues ... let me know.
/* THIS DOES NOT WORK
------------------
*/

//const char DT_Seps[] = {0b11110011,'\0'}; // Date Separator
//const char TM_Seps[] = {0b00111010,'\0'}; // Time Separator
//const char Omega[] = {0b11110100,'\0'}; // Omega, Sigma,Theta
//const char Sigma[] = {0b11110110,'\0'}; // used by Barometer
//const char Theta[] = {0b11110010,'\0'}; // and Hygrometer


/* THIS DOES WORK - CHANGE 'CHAR' TO 'BYTE'
----------------------------------------
*/

const byte DT_Seps = B11110011; // Date Separator
const byte TM_Seps = B00111010; // Time Separator
const byte Omega = B11110100; // Omega, Sigma,Theta
const byte Sigma = B11110110; // used by Barometer
const byte Theta = B11110010; // and Hygrometer
Cheers
(P.S. Still working on PDP book)

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: IDE v1.6.13 VERIFY/COMPILE Errors

Post by andrew » Thu Jul 14, 2022 7:30 am

I just need to clarify something, from the error log you posted these variables seem to be defined in a file that's inside the TinyGPS library folder. So I assumed that these variables where being used by that library (although I was a bit confused why it needed some of them). Is that not the case, are they just being used by the SmartLCD library? If so what specific SmartLCD library function are you using them with?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: IDE v1.6.13 VERIFY/COMPILE Errors

Post by RetroBoy » Thu Jul 14, 2022 12:25 pm

Hi Andrew.

Sorry for any confussion ... have sent PM.

Post Reply

Return to “General Discussion”