Hi Stanley,
when providing all patches from github against the latest zip-package from 2017-01-30 there are some clashes during compile time. I fear, some of the edited sourcefiles didn't made it into github or there are other version conflicts.
Could you please provide us with a tested new zip-package of megaloggerhd with all the changed libraries?
BTW: There are some warnings regarding "comparison of int and uint" and the really annoying warnings "__progmem__"
TIA
Stevie
Providing us with a new zip-package of megaloggerhd???
Re: Providing us with a new zip-package of megaloggerhd???
What errors are you getting? I got latest about a week ago and have had no issues compiling.
Re: Providing us with a new zip-package of megaloggerhd???
Hi protomor,
thanks for reply!
Most errors are while compiling the MultiLCD-library. I'm not sure, but AFAIK you are using megalogger while I'm using megaloggerhd??? ...and I'm running the whole stuff on Linux....Is this comparable?
Did you enable File =>> Settings =>> verbose output during compile time? (free translation, because I'm using Arduino-IDE with German language support)
Compiler warnings are set to Standard....the console output looks really ugly. ...and no! I won't switch to Windoze!
Here in Germany it's time for dinner....and I'm sooo hungry! ...I'll send you a PM later or tomorrow, ok?
thanks for reply!
Most errors are while compiling the MultiLCD-library. I'm not sure, but AFAIK you are using megalogger while I'm using megaloggerhd??? ...and I'm running the whole stuff on Linux....Is this comparable?
Did you enable File =>> Settings =>> verbose output during compile time? (free translation, because I'm using Arduino-IDE with German language support)
Compiler warnings are set to Standard....the console output looks really ugly. ...and no! I won't switch to Windoze!
Here in Germany it's time for dinner....and I'm sooo hungry! ...I'll send you a PM later or tomorrow, ok?
Re: Providing us with a new zip-package of megaloggerhd???
I recently picked up 4 megaloggerhds and had to pull all that stuff down. I do compile using the windows IDE but the errors should be the same.
Re: Providing us with a new zip-package of megaloggerhd???
It says I can't PM you because your account doesn't have permissions or something.
Are you using the Arduino IDE? You shouldn't have to make a makefile. I'm running the code from the git repository with no modifications.
Are you using the Arduino IDE? You shouldn't have to make a makefile. I'm running the code from the git repository with no modifications.
Re: Providing us with a new zip-package of megaloggerhd???
Today, I did a fresh git clone. This seems to be the better way to keep the branch up to date.
I know, Arduino-IDE is the suggested tool to compile the code, but there are some wild hacks automagically errhm "solved" by the IDE.
E.G. besides all the warnings regarding "ignored attribute of __progmem__" running make from the commandline spits out some minor warnings but also serious failures in the memsRead method of OBD class:
--->8--SNIP---8<---
libraries/OBD/OBD.cpp: In member function 'virtual bool COBD::getVIN(char*, byte)':
libraries/OBD/OBD.cpp:301:46: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (*q = hex2uint8(p + 1)) q++;
^
libraries/OBD/OBD.cpp: In member function 'virtual byte COBD::receive(char*, byte, int)':
libraries/OBD/OBD.cpp:377:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (millis() - startTime > timeout) {
^
libraries/OBD/OBD.cpp: At global scope:
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 2 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 3 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 4 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp: In member function 'virtual void COBDI2C::write(const char*)':
libraries/OBD/OBD.cpp:544:35: warning: narrowing conversion of 'millis()' from 'long unsigned int' to 'uint16_t {aka unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
COMMAND_BLOCK cmdblock = {millis(), CMD_SEND_AT_COMMAND};
^
libraries/OBD/OBD.cpp: In member function 'bool COBDI2C::sendCommandBlock(byte, uint8_t, byte*, byte)':
libraries/OBD/OBD.cpp:553:35: warning: narrowing conversion of 'millis()' from 'long unsigned int' to 'uint16_t {aka unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
COMMAND_BLOCK cmdblock = {millis(), cmd, data};
^
libraries/OBD/OBD.cpp: In member function 'virtual byte COBDI2C::receive(char*, byte, int)':
libraries/OBD/OBD.cpp:590:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while(millis() - start < timeout);
--->8--SNAP---8<---
That's the drawback of such a tool like the Arduino-IDE...too much "ugly" code stays undetected and could cause problems in the future...
For this reason, I'm writing code with e.g. kdevelop and a Makefile. Written code this way [b]ever[/b] runs in Arduino-IDE too. ...but the other way arround, all the time the compiler complains about such errors like mentioned above.
Now I'll try to solve the handover failures to memsRead()...
I don't know why it's not possible to send me a PM.
I know, Arduino-IDE is the suggested tool to compile the code, but there are some wild hacks automagically errhm "solved" by the IDE.
E.G. besides all the warnings regarding "ignored attribute of __progmem__" running make from the commandline spits out some minor warnings but also serious failures in the memsRead method of OBD class:
--->8--SNIP---8<---
libraries/OBD/OBD.cpp: In member function 'virtual bool COBD::getVIN(char*, byte)':
libraries/OBD/OBD.cpp:301:46: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (*q = hex2uint8(p + 1)) q++;
^
libraries/OBD/OBD.cpp: In member function 'virtual byte COBD::receive(char*, byte, int)':
libraries/OBD/OBD.cpp:377:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (millis() - startTime > timeout) {
^
libraries/OBD/OBD.cpp: At global scope:
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 2 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 3 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp:467:72: error: default argument given for parameter 4 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive]
bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0)
^
In file included from libraries/OBD/OBD.cpp:10:0:
libraries/OBD/OBD.h:133:15: note: previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' here
virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
^
libraries/OBD/OBD.cpp: In member function 'virtual void COBDI2C::write(const char*)':
libraries/OBD/OBD.cpp:544:35: warning: narrowing conversion of 'millis()' from 'long unsigned int' to 'uint16_t {aka unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
COMMAND_BLOCK cmdblock = {millis(), CMD_SEND_AT_COMMAND};
^
libraries/OBD/OBD.cpp: In member function 'bool COBDI2C::sendCommandBlock(byte, uint8_t, byte*, byte)':
libraries/OBD/OBD.cpp:553:35: warning: narrowing conversion of 'millis()' from 'long unsigned int' to 'uint16_t {aka unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
COMMAND_BLOCK cmdblock = {millis(), cmd, data};
^
libraries/OBD/OBD.cpp: In member function 'virtual byte COBDI2C::receive(char*, byte, int)':
libraries/OBD/OBD.cpp:590:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while(millis() - start < timeout);
--->8--SNAP---8<---
That's the drawback of such a tool like the Arduino-IDE...too much "ugly" code stays undetected and could cause problems in the future...
For this reason, I'm writing code with e.g. kdevelop and a Makefile. Written code this way [b]ever[/b] runs in Arduino-IDE too. ...but the other way arround, all the time the compiler complains about such errors like mentioned above.
Now I'll try to solve the handover failures to memsRead()...
I don't know why it's not possible to send me a PM.
Re: Providing us with a new zip-package of megaloggerhd???
Your IDE isn't compiling as an arduino. The progmem warnings should never happen because that's built into the arduino.
Remember, arduinos are "like" C, but it isn't C. Like the error "default argument given for parameter" should not be an error. That is completely valid syntax and by no means is "ugly".
The only thing that looks "ugly" is the comparison of signed to unsigned integers.
The rest of this is just normal arduino stuff. If you don't like defaults in a function declaration, just make the overloads for them and your errors will clear up.
Have you successfully done a hello world arduino sketch using this IDE?
Remember, arduinos are "like" C, but it isn't C. Like the error "default argument given for parameter" should not be an error. That is completely valid syntax and by no means is "ugly".
The only thing that looks "ugly" is the comparison of signed to unsigned integers.
The rest of this is just normal arduino stuff. If you don't like defaults in a function declaration, just make the overloads for them and your errors will clear up.
Have you successfully done a hello world arduino sketch using this IDE?
Re: Providing us with a new zip-package of megaloggerhd???
Thanks for reply. With kdevelop and Makfiles I compiled perhaps a hundred times code for Arduinos. When you use the Makefile from
https://github.com/sudar/Arduino-Makefile
the toolchain compiles fine the Arduino code.
Meanwhile I could get rid of the function declaration for memsRead() and everything is fine.
The main key was to do a "git clone https://github.com/stanleyhuangyc/ArduinoOBD.git" ....that solved my problems.
But the Arduino-IDE 1.8.1 spits out the same warnings regarding __progmem__
--->8---SNIP---8<---
In file included from projects/megaloggerHD/test/ArduinoOBD-master/megaloggerHD/megaloggerHD.ino:12:0:
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:55:43: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:56:43: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:57:47: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:116:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:117:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:118:39: warning: '__progmem__' attribute ignored [-Wattributes]
void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:189:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:190:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:245:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:246:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:247:39: warning: '__progmem__' attribute ignored [-Wattributes]
void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:304:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:305:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:306:37: warning: '__progmem__' attribute ignored [-Wattributes]
void draw2x(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
--->8---SNAP---8<---
https://github.com/sudar/Arduino-Makefile
the toolchain compiles fine the Arduino code.
Meanwhile I could get rid of the function declaration for memsRead() and everything is fine.
The main key was to do a "git clone https://github.com/stanleyhuangyc/ArduinoOBD.git" ....that solved my problems.
But the Arduino-IDE 1.8.1 spits out the same warnings regarding __progmem__
--->8---SNIP---8<---
In file included from projects/megaloggerHD/test/ArduinoOBD-master/megaloggerHD/megaloggerHD.ino:12:0:
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:55:43: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:56:43: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:57:47: warning: '__progmem__' attribute ignored [-Wattributes]
virtual void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height) {}
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:116:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:117:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:118:39: warning: '__progmem__' attribute ignored [-Wattributes]
void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:189:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:190:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:245:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:246:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:247:39: warning: '__progmem__' attribute ignored [-Wattributes]
void draw4bpp(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:304:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:305:35: warning: '__progmem__' attribute ignored [-Wattributes]
void draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height, byte scaleX, byte scaleY = 0);
^
arduino-1.8.1/libraries/MultiLCD/MultiLCD.h:306:37: warning: '__progmem__' attribute ignored [-Wattributes]
void draw2x(const PROGMEM byte* buffer, uint16_t width, uint16_t height);
--->8---SNAP---8<---
Re: Providing us with a new zip-package of megaloggerhd???
You can take out all of that progmem stuff. It's just background images and what not. I have code to pull raw images from the SD card and display it.
Glad you got it working.
Glad you got it working.
Re: Providing us with a new zip-package of megaloggerhd???
Hi protomor,
did you get my PM from
Thu Mar 30, 2017 4:08 pm
??
As far as I can see it sits in the outbox and was not sent.
did you get my PM from
Thu Mar 30, 2017 4:08 pm
??
As far as I can see it sits in the outbox and was not sent.