Procházet zdrojové kódy

allow defining custom MINMEA_MAX_SENTENCE_LENGTH

Kosma Moczek před 3 roky
rodič
revize
c0d2f58128
2 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 3 0
      README.md
  2. 2 0
      minmea.h

+ 3 - 0
README.md

@@ -41,6 +41,9 @@ Minmea runs out-of-the-box under most Unix-compatible systems. Support for non-U
 1. Define `MINMEA_INCLUDE_COMPAT` in the build environment.
 2. Add appropriate compatibility header from under `compat/` directory as `minmea_compat.h`.
 
+If your GPS receiver outputs very long sentences, consider increasing `MINMEA_MAX_SENTENCE_LENGTH`
+in your build environment.
+
 ## Fractional number format
 
 Internally, minmea stores fractional numbers as pairs of two integers: ``{value, scale}``.

+ 2 - 0
minmea.h

@@ -23,7 +23,9 @@ extern "C" {
 #include <minmea_compat.h>
 #endif
 
+#ifndef MINMEA_MAX_SENTENCE_LENGTH
 #define MINMEA_MAX_SENTENCE_LENGTH 80
+#endif
 
 enum minmea_sentence_id {
     MINMEA_INVALID = -1,