-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error #7
Comments
I made a fix so that it compiles not. I did not test the RTE code itself, since it is made by other. The problem itself may come if you do not keep full error/warning reporting on on compiler. With PlatformIO one good thing is that you can set all warnings on and also treat all warnings as error. In this way there won't be any warnings on the code. And why warnings are critical - if you e.g. write a code: |
Hi Timo This does not really help. None of the 3 examples in NMEA0183 compile successfully. Bringing warnings to errors will not solve my problem. |
Hi Timo I have also a problem with compiling examples of the NMEA0183 library. NMEA2000 library works fine.
|
For some reason they have not defined that for DUE. You can add availableForWrite manually (version depends of your library version):
and to file: "C:\Users\lappalai\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\cores\arduino\HardwareSerial.h"
|
Hi Timo I have another question. Is It possible tu set up arduino to send data in this way?: Thanks again |
Yes it it. You just need to write handlers in bot direction. There are examples for both, which you need to combine and make your own handling. Since you are using DUE and it has build in two USB, you could do it like this: So take NMEA 0183 traffic to DUE and forward it to USBSerial. Also parse data and forward it to N2k bus. |
Hi Timo |
Do you mean code for DUE? I'll could combine something for start. The waypoints is complex. Can you run NMEA0183 with 38400 bps on reception end? Otherwise there is no room for all messages. |
Hi Timo |
Hi Timo |
Sorry I have been busy. I'll try to find time. |
There is now first iteration of converter. Connect: |
Great, you are the best... thanks. |
I updated the example with some improvements. |
Hi |
The new version does not make difference, since it just has some cosmetic changes. If I remember right this is the problem with DUE port. I'll try to look it. |
I updated the example, but it does not solve the problem. SerialUSB will block regardless using current method or just print, when you close the port. Serial does not do that, so as I added to comment: |
Hello, I suspect something incompatible in low level includes, but hard to catch. Any hint ? |
Do you also have NMEA2000 library included? Mega has so little RAM and it can just run NMEA2000 library, but maybe not together with NMEA0183 library. Other problem may be that to simplify things I have used sprintf, which also eats memory. I prefer to use Teensy 3.2 boards or better. They are more powerfull and has more memory. |
Hello, No I have just the NMEA one. Here is the code that hung #include <NMEA0183.h> void setup() { Serial.begin(9600); If I comment the include statements from the NMEA library then it works, meaning that the Serial.print is executed properly. |
I still think problem it is related to low memory and e.g. sprintf. I got rather beginning frustrated with Mega due to its low memory. |
I agree that 8K of memory is indeed an issue, but in this particular case, I suspect rather a library conflict at very low level, because even Serial is not working while no NMEA code has been yet executed. I will investigate a bit or giveup if no obvious solution found. Moving to a larger CPU is an option or working something more frugal (simple multiplexing) inside the Arduino. Thank you anyway |
Have you checked Teensy boards? I have used them a lot and in boat I have e.g. temperature monitor for NAME 2000 network using 1-wire sensors. By compiling Teensy 3.2 to 24 MHz it draws only 13 mA from 12V. |
I've been trying to compile a slightly modified version of the NMEA0183ToN2k example for a Teensy 3.2, but I'm also getting Time.h library errors.
And then a list of errors to all the calls to functions within Time.h. EDIT: |
This is an issue with time library. There has been different time.h libraries and some has missed some definitions. That example is old and should be updated. I try to find time for best solution. |
This is maybe the same issue that I have on Arduino with different symptoms. To be able to compile I had to tweak the code for using Time.h. I will double check the details and post here. But this can explain why the system hung due to a type mismatch somewhere. |
Hi. I get the follwing error when tryin to compile for the teensy 3.2
|
I installed arduino+teensyduino, example and necessary libraries to clean PC. It compiled without problems. I do not have linix available, so I can not test the problem. One reason may be that on include there is <Time.h>. I even deleted library ...hardware/teensy/avr/libraries/Time/TimeLib.h and it still compiled, so on PC it doe not use that at all. You could try to change include to time.h, since linux filenames are case sensitive. |
Hi Timo, This solution appear to work fine with this library/project. However, after adding these lines, my others Arduino skeches stop compiling with different error message. Is this problem specific to Arduino Due ? Will I have the same problem with Arduino Mega ? Have you planned or is it possible to correct this issue directly in the NMEA0183 library ? And finally, thank you for your GREAT JOB !!! Hugo |
I expect that errors must be caused, if you use on other skecthes classes inherited from print class and they does not have availableForWrite defined. Still I do not understand, why they have not defined that for DUE and on its inherited classes. It is problematic to fix on NMEA0183 library. With define I could make it so that it does not check it for DUE, but then it would mean that your code would block for writing data and your loop would stop until everything would have been written. I have totally skipped DUE and changed to Teensy, since Teensy has more memory and draws less current. |
Timo, Thank you for your answer. Last question: Which version of Teensy do you use for that project ? Again, thanks for that great job ! Hugo |
That depends of project. Very big or projects requiring SDCard Teensy 3.6. Teensy 3.2 can do really lot. Also if you compile Teensy 3.2 to 24 MHz it can still handle NMEA 2000, but it draws only 13 mA on 12V with good DC-DC converter. |
Hi Timo
Maybe a silly problem, but I am unable to compile die examples of the NMEA0183 library:
C:\Users\Uwe\Documents\Arduino\libraries\NMEA0183/NMEA0183Messages.h: In member function 'char* tRTE::operator const':
C:\Users\Uwe\Documents\Arduino\libraries\NMEA0183/NMEA0183Messages.h:50:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (i > nrOfwp || i < 0) {
C:\Users\Uwe\Documents\Arduino\libraries\NMEA0183/NMEA0183Messages.h:53:11: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
C:\Users\Uwe\Documents\Arduino\libraries\NMEA0183/NMEA0183Messages.h:58:21: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
Any idea?
best Regards Uwe
BTW, the example in the NMEA2000 lib work fine
The text was updated successfully, but these errors were encountered: