ttlappalainen / NMEA0183

Library for handling NMEA0183 messages
69 stars 44 forks source link

additional NMEA0183 functions #40

Closed AndrasSzep closed 1 year ago

AndrasSzep commented 1 year ago

additional NMEA0183 functions

ttlappalainen commented 1 year ago

You have debug type printing in the code: Serial.print("Water Depth= "); Serial.println(pBD->WaterDepth,1);

Make them optional. See e.g., on NMEA2000.cpp

#if defined(NMEA2000_DEBUG)
# define N2kDbg(fmt, args...)     DebugStream.print (fmt , ## args)
# define N2kDbgln(fmt, args...)   DebugStream.println (fmt , ## args)
#else
# define N2kDbg(fmt, args...)
# define N2kDbgln(fmt, args...)
#endif

The code should be compatible with any board. Now you have fixed it to ESP32 by using esp_efuse_mac_get_default(chipid); Note also that that is not good way, since NMEA2000 unique ID is only 21 bits long. With bad luck you will generate double.

Before you send fixed pull, check that it compiles with at least Arduino Mega, Arduino DUE and Teensy.

ttlappalainen commented 1 year ago

I tried to compile this example and got several errors.

gerryvel commented 1 year ago

i have also (the same) errors: