FactbirdHQ / mqttrust

MQTT client for embedded devices, written in rust
53 stars 5 forks source link

Update embedded-nal v0.2.0 #18

Closed keisrk closed 3 years ago

keisrk commented 3 years ago

Update to use the latest release of embedded-nal.

codecov-io commented 3 years ago

Codecov Report

Merging #18 (6085ce2) into master (d54fea0) will increase coverage by 6.09%. The diff coverage is 27.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   41.50%   47.60%   +6.09%     
==========================================
  Files           4        5       +1     
  Lines         506      521      +15     
  Branches      149      138      -11     
==========================================
+ Hits          210      248      +38     
+ Misses        218      196      -22     
+ Partials       78       77       -1     
Impacted Files Coverage Δ
src/lib.rs 30.00% <ø> (+17.24%) :arrow_up:
src/eventloop.rs 24.86% <24.86%> (ø)
src/state.rs 40.76% <66.66%> (+5.12%) :arrow_up:

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 d54fea0...6085ce2. Read the comment docs.

keisrk commented 3 years ago

I found I needed some rework on the state machine to manage multiple packets in a neat way.

keisrk commented 3 years ago

I implemented the multiple packet handling. I assume contiguous packets in the buffer, i.e., no padding bytes between them. The limitation is that in the case decode_packet detects a packet is malformed, the entire buffer should be discarded. I confirmed it worked for the Ublox cellular example.