Open atestani opened 2 weeks ago
I found more information from the error in the build output:
In file included from src/main.cpp:39:
.pio/libdeps/esp32dev/NMEA2000-library/src/NMEA2000_CAN.h:278:12: note: previous declaration as 'tNMEA2000& NMEA2000'
tNMEA2000 &NMEA2000=*(new tNMEA2000_esp32());
So I don't need to declare the main object?
if you use
you do not explicitely include specific MCU driver and define NMEA2000 object.
Do I still use #include
No. When you use #include
Thanks... good to know. Is this documented somewhere? I read everything I could find before posting here.
On Fri, Jun 7, 2024, 12:54 AM Timo Lappalainen @.***> wrote:
No. When you use #include
, it includes necessary driver, if it can. If it can not then you do not #include and you have to explicitely include driver and define NMEA2000 object. — Reply to this email directly, view it on GitHub https://github.com/ttlappalainen/NMEA2000_esp32/issues/26#issuecomment-2153983818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2MD75BIJ6AJGXO6C5OUJ3ZGE4IFAVCNFSM6AAAAABI5TT436VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHE4DGOBRHA . You are receiving this because you authored the thread.Message ID: @.***>
Actually, I found it in the main document under: NMEA2000_CAN.h File Reference
On Fri, Jun 7, 2024 at 11:34 AM Al Testani @.***> wrote:
Thanks... good to know. Is this documented somewhere? I read everything I could find before posting here.
On Fri, Jun 7, 2024, 12:54 AM Timo Lappalainen @.***> wrote:
No. When you use #include
, it includes necessary driver, if it can. If it can not then you do not #include and you have to explicitely include driver and define NMEA2000 object. — Reply to this email directly, view it on GitHub https://github.com/ttlappalainen/NMEA2000_esp32/issues/26#issuecomment-2153983818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2MD75BIJ6AJGXO6C5OUJ3ZGE4IFAVCNFSM6AAAAABI5TT436VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHE4DGOBRHA . You are receiving this because you authored the thread.Message ID: @.***>
I am porting a Teensy3.2 NMEA2000 application to ESP32. I'm using PlatformIO and an ESP32-WROOM-32E.
platformio.ini is:
The start of the code looks like this:
The last line is giving a conflicting declaration error. I have searched throughout the code several times and cannot find why this is happening. Also, I have been unable to find a documented example for use of these libraries on an ESP32. Any advice?
Thanks