rename MINMEA_MAX_LENGTH -> MINMEA_MAX_SENTENCE_LENGTH

This commit is contained in:
Kosma Moczek 2022-06-03 01:24:58 +02:00
parent 6915c08c59
commit 1e2f0af7d8
5 changed files with 6 additions and 6 deletions

View File

@ -75,7 +75,7 @@ The library doesn't perform this conversion automatically for the following reas
## Example
```c
char line[MINMEA_MAX_LENGTH];
char line[MINMEA_MAX_SENTENCE_LENGTH];
while (fgets(line, sizeof(line), stdin) != NULL) {
switch (minmea_sentence_id(line, false)) {
case MINMEA_SENTENCE_RMC: {

View File

@ -16,7 +16,7 @@
int main(void)
{
char line[MINMEA_MAX_LENGTH];
char line[MINMEA_MAX_SENTENCE_LENGTH];
while (fgets(line, sizeof(line), stdin) != NULL) {
printf("%s", line);
switch (minmea_sentence_id(line, false)) {

View File

@ -47,7 +47,7 @@ bool minmea_check(const char *sentence, bool strict)
uint8_t checksum = 0x00;
// Sequence length is limited.
if (strlen(sentence) > MINMEA_MAX_LENGTH + 3)
if (strlen(sentence) > MINMEA_MAX_SENTENCE_LENGTH + 3)
return false;
// A valid sentence starts with "$".

View File

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

View File

@ -269,7 +269,7 @@ END_TEST
START_TEST(test_minmea_scan_s)
{
char value[MINMEA_MAX_LENGTH];
char value[MINMEA_MAX_SENTENCE_LENGTH];
ck_assert(minmea_scan(",bar,baz", "s", value) == true);
ck_assert_str_eq(value, "");
@ -402,7 +402,7 @@ START_TEST(test_minmea_scan_complex2)
struct minmea_float bearing_true; char bearing_true_mark;
struct minmea_float bearing_magnetic; char bearing_magnetic_mark;
struct minmea_float distance; char distance_units;
char name[MINMEA_MAX_LENGTH];
char name[MINMEA_MAX_SENTENCE_LENGTH];
ck_assert(minmea_scan(sentence, "tTfdfdfcfcfcs",
type,
&t,