technocreatives / sim7000

Rust drivers for the SIM7000 series of modems
Apache License 2.0
18 stars 8 forks source link

Redesign line reader #9

Closed ZoeyR closed 2 years ago

ZoeyR commented 2 years ago

The current line reader was horribly broken. The redesign makes the reader match the datasheet more closely. Insead of reading until \r\n and returning all text up until then, the new reader finds the leading \r\n that preceeds all sim7000 lines. It then reads up to the following \r\n to terminate the line. This resolves intermittent issues with echo as well as some unsolicited result codes.

codecov[bot] commented 2 years ago

Codecov Report

Merging #9 (8566e4c) into main (1dfaae3) will increase coverage by 1.50%. The diff coverage is 67.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   35.02%   36.52%   +1.50%     
==========================================
  Files          32       32              
  Lines         748      720      -28     
==========================================
+ Hits          262      263       +1     
+ Misses        486      457      -29     
Impacted Files Coverage Δ
src/commands/ccid.rs 0.00% <ø> (ø)
src/commands/cgmr.rs 0.00% <ø> (ø)
src/commands/cgnscpy.rs 0.00% <ø> (ø)
src/commands/cgnsinf.rs 52.94% <ø> (+1.99%) :arrow_up:
src/commands/cgnspwr.rs 0.00% <ø> (ø)
src/commands/cgreg.rs 0.00% <ø> (ø)
src/commands/cipstart.rs 0.00% <0.00%> (ø)
src/commands/cipstatus.rs 0.00% <0.00%> (ø)
src/commands/cntp.rs 0.00% <ø> (ø)
src/commands/cops.rs 0.00% <ø> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1dfaae3...8566e4c. Read the comment docs.