AeroRust / nmea

NMEA 0183 - for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GNSS receivers and many other types of instruments. Defined and controlled by the National Marine Electronics Association (NMEA)
https://crates.io/crates/nmea
Other
56 stars 41 forks source link

Unified handling text parameters #93

Closed taavit closed 1 year ago

taavit commented 1 year ago

During experiments with c bindings for nmea library, found that multiple MAX_LEN consts are used around. All of the same value (64). This causes cbindgen to generate single const with ambiguous meaning. When I look closer, found that I've used manual conversion waypoint ids to ArrayString, while proper array_string method is already done. This PR fixes this as well, and because array_string is used just for parameters, I've updated error with more proper one (ParameterLength).

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.59 :warning:

Comparison is base (512fd1a) 80.31% compared to head (86b50fe) 79.73%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #93 +/- ## ========================================== - Coverage 80.31% 79.73% -0.59% ========================================== Files 33 33 Lines 1199 1189 -10 ========================================== - Hits 963 948 -15 - Misses 236 241 +5 ``` | [Impacted Files](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust) | Coverage Δ | | |---|---|---| | [src/parse.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3BhcnNlLnJz) | `73.62% <ø> (ø)` | | | [src/sentences/bwc.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9id2MucnM=) | `90.62% <ø> (ø)` | | | [src/sentences/aam.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9hYW0ucnM=) | `96.29% <50.00%> (-3.71%)` | :arrow_down: | | [src/sentences/bod.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9ib2QucnM=) | `77.27% <50.00%> (-7.73%)` | :arrow_down: | | [src/sentences/txt.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy90eHQucnM=) | `83.33% <50.00%> (-3.63%)` | :arrow_down: | | [src/sentences/utils.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy91dGlscy5ycw==) | `97.67% <66.66%> (-2.33%)` | :arrow_down: | | [src/sentences/bww.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy9id3cucnM=) | `100.00% <100.00%> (ø)` | | | [src/sentences/zfo.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy96Zm8ucnM=) | `78.57% <100.00%> (-4.77%)` | :arrow_down: | | [src/sentences/ztg.rs](https://app.codecov.io/gh/AeroRust/nmea/pull/93?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AeroRust#diff-c3JjL3NlbnRlbmNlcy96dGcucnM=) | `78.57% <100.00%> (-4.77%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.