-
Notifications
You must be signed in to change notification settings - Fork 230
Changes
-
Added PGN 128000 Leeway to N2kMessages.h/.cpp
-
Fix: Spelling WaterRefereced -> WaterReferenced on N2kMessages.h/.cpp
- Fix some build errors due to missing include statements (did not affect Arduino, only other platforms)
- Fix: Default responces to Complex Group Function.
- Added library.json, thanks for ronzeiller.
-
Fix: fill unused chars on fastpacket messages with 0xff
-
Fix: fill unused chars on message fixed sized strings with 0xff. One sample is e.g. PGN 126996, Product Information.
-
Changed tActisenseReader class to handle also Actisense N2k request message types. This type will be used by applications, which sends data through NGT-1.
-
Updated related examples ActisenseListener and ActisenseListenerSender.
-
Renamed Min/Max to N2kMin/N2kMax, since Due code had definitions for Min/Max
-
Added PGN validity check to the SendMsg()
-
Changed max/min -> own Max/Min. max/min defines does not exist on other systems and Arduino does not have std for all boards.
-
Fix: PGN 126992 TimeSource handling.
-
Fix: Added missing wind reference type.
-
Added range parameter for depth PGN 128267.
-
Added millis() time stamp to N2kMsg clear text Print.
-
Now responces also Group Function request for PGN lists PGN 126464
-
Now responces also Group Function request for Product Information PGN 126996
-
Now responces also Group Function request for Configuration Information PGN 126998
-
Fix: spelling Sertification -> Certification
-
Fix: on changing SystemInstance reseted DeviceInstance
-
Fix: "Group function" responces according to tests with certified Airmar DST800
-
Fix: Address claiming could go up to 253 and did not went to "cannot claim". Now, if address cannot be claimed, goes to "cannot claim state" and prevents all message output except ISO address claim.
-
Fix: fast packet response for less than 7 data bytes caused two frames.
-
Fixed PGN 128259 parser SOG data type.
-
DataDisplay2 example update.
Added support for humidity PGN 130313 by Tom McAdam.
Fixes and new feature
-
Support for changing configuration information fields InstallationDescription1 and InstallationDescription2 on runtime e.g. with NMEA Reader. Meaning of those fields is define their "installation description". So if you have two engine monitor devices, you can set e.g. InstallationDescription1 field to "Port engine" for one and "Starboard engine" for other. So it is not necessary to hardcode those setting. Of coarse your code must support parameter saving to e.g. EEPROM as with other parameters (see ReadResetInstallationDescriptionChanged, ReadResetAddressChanged and ReadResetDeviceInformationChanged). I have example under construction for handling parameter changes.
-
Changed some indexes to size_t. This may effect compatibility, if you have used those functions.
- New versions of NMEA2000_due and due_can (see. https://github.com/ttlappalainen/due_can)
Fixes and new features
-
Fixed setting device instances on N2kGroupFunctionDefaultHandlers
-
Fixed wind PGN 130306 output with reserved field.
-
New abstract class tNEMA2000:tMsgHandler and functions AttachMsgHandler/DetachMsgHandler. With these you can have multiple handlers. It also allow PGN specific handlers. See how it has been used on example DeviceAnalyzer. Other simple example is under construction.
-
New class tN2kDeviceList. See more on library reference and on example DeviceAnalyzer.
-
Improved message type checking. This will be done for every message, so speed in important. For Arduino Mega average test time was dropped from about 90 us to 9 us and for Teensy from 3.5 us to 0.9 us.
Fix and cosmetic changes
-
ForwardStream initialization was accidentaly deleted
-
Clean code and more debug options.
Fixes and cosmetic changes
-
Crashed, if ForwardStream was not defined. I accidentaly forgot to comment some debug code.
-
Definition of tDeviceInformation changed to fixed sized data so that compiler can not mix them.
-
Added debug definitions to avoid first bug.
-
Some cosmetic changes and tests.
Changes due to different revisions of FlexCAN library for Teeansy boards. NOTE! You must update NMEA2000_Teensy library.
I also forked and developed FlexCAN library from collin80 and also send pull request for him. Until updated there my fork has more features for use with NMEA2000 library.
NOTE! Some compatibility changes.
-
!NOTE compatibility change. tProductInformation has been moved inside tNMEA2000 class. If you have defined tProductInformation to PROGMEM as in example BatteryMonitor, you need to change definition const tProductInformation... to const tNMEA2000::tProductInformation... See example BatteryMonitor.
-
Multi device support should work now. So you can show several devices on bus with single hw. See example MultiDevice.
-
!NOTE compatibility change. tDeviceInformation has been moved inside tNMEA2000 class. This was used only internally until 11.06.2017 release.
Added NMEA 2000 mandatory features. Some bug fixes.
-
!NOTE compatibility change. PROGMEM configuration information did not work and actually wasted RAM. You should define each configuration information string alone as PROGMEM and call changed SetProgmemConfigurationInformation. See sample BatteryMonitor
-
Due to new mandatory features library requires more RAM and program memory. It is possible to squeeze requirements with compiler options. See more info on NMEA2000_CompilerDefns.h.
-
Added new class tN2kGroupFunctionHandler (N2kGroupFunction.h/.cpp) for NMEA 2000 group function (PGN 126208) handling. Group function can be used to e.g. to set "temperature instance" or "set temperature" fields on PGN 130316.
-
Added automatic Heartbeat, which is mandatory for certified NMEA 2000 devices. If you do not want it to be sent, you have to set heartbeat interval to 0. Added also function SetHeartbeatInterval, GetHeartbeatInterval and SendHeartbeat.
-
Added group function handling for PGN 60928 (ISO Address) and PGN 126993 (Heartbeat). Handlers can be found on N2kGroupFunctionDefaultHandlers module.
-
Added functions ReadResetDeviceInformationChanged, SetDeviceInformationInstances, GetDeviceInformation for checking, setting and reading device instance changes. See more info on document.
-
Added ISO Multi-packet handling. Changed logic on SetN2kCANBufMsg due this.
-
Added PGN 130314 by sarfata.
-
Added PGN 127245 rudder parser
-
Fixed Device Information, last bit must be set to 1
-
Fixed response to ISO Address Claim request. Seems that all new devices respond allways with broadcast instead of caller address.
Changed default NMEA2000 variable definition in NMEA2000_CAN.h to reference. So now it is possible to refer it in other modules with definition: extern tNMEA2000 &NMEA2000;
Added Binary status report (PGN 127501) handling. See updated examples MessageSender and DataDisplay2.
Added PGN 129539 support and PGN 129283, 129284 parsers by denravonska.
Debug mode check for DeviceReady and ParseMessages.
RPi socketCAN auto selection and MBED compiler portability fix by thomasonw.
Fixed Heading PGN 127250 parsing
Replace pointer casting with memcpy to avoid unaligned access, and add endian support. Thanks to denravonska.
- Handle for PGN 65240 "Commanded address". E.g. diagnostic device may command your device to change address.
Document and some example fixes to match library portability changes.
Added support for PGN 126464L, PGN List (Transmit and Receive). Library will automatically respond to this message. You need only add message lists and call to methods ExtendTransmitMessages and/or ExtendReceiveMessages. See e.g. example TemperatureMonitor.
Fixes to avoid compiler warnings
Portability fixes. Thanks to denravonska and thomasonw!
-
NOTE! compatibility issue! There is no more default stream set on library constuctor. So in case you are using forwarding, you need to setup it (like in examples) NMEA2000.SetForwardStream(&Serial);
-
This reduces the Arduino dependency, allowing the library to more easily be used on other platforms. Check all changes under https://github.com/ttlappalainen/NMEA2000/pull/35
License change to MIT for more permissive
- Also some started to remove platform dependent code.
PGN129025 parser added and some fixes by KimBP
Added support for PGN 127258 - magnetic variation by adwuk.
Added parsing for PGN 130311 by adwuk. Typo fix for system date comment by sarfata.
Lot of testing behind - hopefully works now better.
-
NOTE! New method SetN2kCANSendFrameBufSize. Added buffer for frames to be sent. This takes more RAM and may be critical for low RAM systems.
-
If frame sending fails, system now buffers frames to be sent automatically and tries to resend them on next call for ParseMessages. With this feature it solved my problem that time to time my MFD could not receive important GNSS or SOG/GOG messages and informed error.
-
System now also has more reliable response to the Product Information ISO request (PGN 126998). Unfortunately if your system does not poll often enough incoming messages (ParseMessages), you still may loose the request itself. This is specially the case if you system spends some time reading sensors like 1-wire system. Even with 1-wire asynchronous read, it may spend 10 ms interrupts disabled. Within 10 ms there may be about 30 messages on bus.
-
New methods SetConfigurationInformation and SetProgmemConfigurationInformation. System can now also handle Configuration Information ISO request to (PGN 126998). Default configuration information is saved to PROGMEM.
-
NOTE! Reload also NMEA2000_due!
Temporary fix for problem to respond product information ISO request.
Thanks for people (usauerbrey, OzOns), who noted below problems
-
NOTE! If you are using NMEA2000_can, remember to update that too!
-
Fix for ISORequest handling. Now responds allways also for broadcasts.
-
Some fixes to avoid compiler warnings.
-
Fix for parsing PGN 127257/Attitude
NOTE! Fixed PGN 130310, PGN 130311 and added SetHandleOnlyKnownMessages(), which effects backward compatibility. See below.
-
NOTE! On PGN 130310 and PGN 130311 description says that "Atmospheric pressure in Pascals. Use function mBarToPascal". There was scaling error and now they works like description. After update you have to provide value on Pascals and really use mBarToPascal, if you have your value in mBar.
-
NOTE! Added SetHandleOnlyKnownMessages(). If you have called SetForwardOnlyKnownMessages(true), library did not handle unknown messages. After update, this effects only message forwarding - as it should have been. So call also SetHandleOnlyKnownMessages(true), if you want to disable any handling for unknown messages.
-
NMEA 2000 Library reference update.
-
Added ExtendSingleFrameMessages and ExtendFastPacketMessages. With these one can own list of known messages so that it is not necessary to duplicate message list as, if used only SetSingleFrameMessages and SetFastPacketMessages.
-
Added discrete status flags for transmission parameters (PGN 127493), thanks for testing Jason.
Added SetISORqstHandler for setting handler for ISO requests. Thanks thomasonw.
NMEA 2000 Library reference update.
Added example TeensyActisenseListenerSender. Example contains code, schematics and document.
Fixed discrete status on engine dynamic parameters (PGN 127489), thanks Jason.
Added new PGN 127257, vessel attitude. Only sending has been tested with NMEA Reader
Added to API -- Optional message lists by thomasonw
Corrected Battery Current in ParseN2kPGN127508 by thomasonw.
Additional PGN 129038, PGN 129039, PGN 129285, PGN 130074 support by adwuk.
Fix of using PROGMEM. Now also product information defined to PROGMEM works right.
Fix of using PROGMEM. Still does not work right with product information in PROGMEM. So all changes after 09.03 are still under validation.
More memory optimization - thanks for thomasonw. Constant message strings has been marked with F(...) moving them to flash instead of RAM.
Note also that there is new funtion void tNMEA2000::SetProductInformation(const tProductInformation *_ProductInformation); So one can save memory by defining product information to flash by using syntax: + const tProductInformation BatteryMonitorProductInformation PROGMEM={ + 1300, // N2kVersion + ... + See example BatteryMonitor.ino
Memory tuning. Currently multi device and user definable message filters has not been implemented, so I changed buffer sizes to minimum.
There is also new function void tNMEA2000::SetN2kCANMsgBufSize(const unsigned char _MaxN2kCANMsgs); to define buffer size for received N2k messages. Note that library has to collect fast packet frames, which may arrive fragmented from different devices, so as default this buffer size has been set to 5. If your device is only sending some data (mode is tNMEA2000::N2km_NodeOnly), you do not need to catch all fast packet messages (if any), so you can set buffer size smaller.
Additional PGN 127250, PGN 128275 Support by adwuk.
AVR CAN support by thomasonw.
NOTE! Updates, which effects backward compatibility. See list below.
-
PGN 127489, SetN2kPGN127489 EngineOilTemp and EngineCoolantTemp is in Kelvins as in other temperature functions. So add for call to this function CToKelvin(...)
-
Some function names withing N2kMessages have been changed. Change function names listed below! + SetN2kPGNSystemTime -> SetN2kSystemTime + ParseN2kPGNSystemTime -> ParseN2kSystemTime + SetN2kPGNTrueHeading -> SetN2kTrueHeading + SetN2kPGNMagneticHeading -> SetN2kMagneticHeading
-
Variable types has been changed on some functions in N2kMessages. So when you get an compiler error about functions in N2kMessages, check carefully all parameter definitions for function from N2kMessages.h.
-
If you do not have value for some parameter for functions in N2kMessages, use related N2kxxxxNA constant defined in N2kMsg.h. So e.g. if you only have wind speed, call + SetN2kWindSpeed(N2kMsg, 1, ReadWindSpeed(),N2kDoubleNA,N2kWind_Apprent);
-
If you are reading values from N2k bus, you can now check does some value exist by using function N2kIsNA. So if you e.g. call + ParseN2kOutsideEnvironmentalParameters(N2kMsg,SID,WaterTemperature,OutsideAmbientAirTemperature,AtmosphericPressure); + then check pressure value with + if ( !N2kIsNA(AtmosphericPressure) ) { // It is available, so we can show it!
-
Added reference document to the documents, which hopefully helps to get started.
Added PGN 127493 support. NMEA2000_mcp has now interrupt support. Some other fixes.
Added some comments to samples and several new message readers. Also added support for 130316 extended temperature. Added new include N2kMessagesEnumToStr.h for translating library enums to clear text. This is now just for preliminary so I may changes texts in coming future. Added also new examples DataDisplay2.ini and MessageSender.ino. They are extended versions of DataDisplay.ino and TemperatureMonitor.ino.
Added NMEA2000_CAN.h and some fixes. Library has been originally developed with Arduino Software 1.6.5 On Arduino Software 1.6.6 it is possible to include libraries within included files, so now it is possible to just include one file NMEA2000_CAN.h, which automatically selects right CAN library according. So you can have same code for different hw. Currently supported CAN libraries are mcp_can, due_can and teensy. Note! NMEA2000_CAN.h is now used on examples TemperatureMonitor and WindMonitor!