FactbirdHQ / atat

no_std crate for parsing AT commands
Apache License 2.0
115 stars 31 forks source link

add custom parse function to AtatCmd derive #200

Closed dragonnn closed 9 months ago

dragonnn commented 9 months ago

While still struggling with parsing QIRD response from Quactel BG95 for all possible use case where the binary payload does contain bytes that are equal too \n or \r or other whitespace or even comma with was causing a lot of problems too I come to the conclusion that the response is just to obscure for serde_at and I implemented AtatCmd trait myself overriding the parse function to not use serde_at at all for this one outlier.

But that does lead to a lot more boilerplate in my code since now I need to implement AtatLen and all other trait functions for that structs. With this PR this can be avoided and a user can just provide a custom parse function with the parse argument on the at_cmd attributes when using AtatCmd derive