Closed melucas closed 6 years ago
EnableForward is the right way, but I do not see why it would have any effect to the N2k bus traffic. There seem to be small configuration bug on forward bit definitions: static const int FwdModeBit_EnableForward
They should be static const unsigned int FwdModeBit_EnableForward
, but it should not have any effect.
Have you checked that data flow really stops and your loop continues running normally?
You are right. I my loops waiting for serial input I was not calling the N2K processing.
I've added that in and now it seems to be ignoring the NMEA2000.EnableForward(false); which I set before I display the menu. My MFD is getting the data, but I'm also seeing the N2K output on the serial console.
Thank you, Michael
I figured out item 1 above. I was not calling NMEA2000.EnableForward(false); in the right order before displaying the menu.
Still looking for a suggestion on item 2 above.
Currently there is no way. In principle bool ForwardEnabled() const
could be public.
Can you add that to your feature request list? I can work around that now using a variable in my code. Thanks, Michael
Hi,
Using the TemperatureMonitor example, I have the Forward of the N2k data setup tp send to the USB serial port as follows:
NMEA2000.SetForwardStream(&Serial); NMEA2000.SetForwardType(tNMEA2000::fwdt_Text);
I am adding a configuration menu to the serial port and need a way to pause/disable to ForwardStream. So far, the only way I can get the N2k output to stop and running the menu off the screen is to:
NMEA2000.EnableForward(false);
Before writing the menu and then:
NMEA2000.EnableForward(true);
After the menu is exited. This works, but it stops the flow of the data onto the N2k bus and my Raymarine MFD eventually resets the data display to --.
What is the correct way to pause the ForwardStream and then restart it?
Thank you, Michael