NMEA2000 icon indicating copy to clipboard operation
NMEA2000 copied to clipboard

problem compiling ActisenseReader.cpp

Open tdjastrzebski opened this issue 3 years ago • 2 comments

Compiling the library GCC compiler (GNU Arm Embedded Toolchain 10.3-2021.07) throws this error:

NMEA2000/src/ActisenseReader.cpp:117:33: error: 'class N2kStream' has no member named 'peek'
  117 |   while ((NewByte = ReadStream->peek()) != -1 && !result && ContinueLoopAvailable) {
      |                                 ^~~~

It seems indeed peek() is missing from N2kStream.
What am I missing?

tdjastrzebski avatar Oct 22 '21 11:10 tdjastrzebski

Seems that I have not updated it to other environments. If you compile for Arduino environment, N2kStream is typedef for Stream, which has peek(). For e.g. avr it is missing. Could you add and test it?

ttlappalainen avatar Oct 22 '21 12:10 ttlappalainen

I try to compile for STM32. I think I will just exclude ActisenseReader but the issue at some point may deserve a solution.

tdjastrzebski avatar Oct 22 '21 12:10 tdjastrzebski