Fix mac_version -> mac_version().

The first returns the Protobuf integer, the second the generated enum
type. The big difference is that the first .to_string() would convert
the Protobuf integer to the same but then as String type, where the
latter returns something like '1.0.3' which is provided by the
fmt::Display trait implementation by ChirpStack.
This commit is contained in:
Orne Brocaar 2022-08-11 11:38:43 +01:00
parent ca567ca562
commit 77dc247f66

View File

@ -262,7 +262,7 @@ impl TxAck {
let mut ds = self.device_session.as_mut().unwrap();
if ds.mac_version.to_string().starts_with("1.0") {
if ds.mac_version().to_string().starts_with("1.0") {
ds.n_f_cnt_down += 1;
} else {
ds.a_f_cnt_down += 1;