L1NNA / SV1DUR

Planes-On-The-Bus-Go-Swish-Swish-Swish
3 stars 1 forks source link

Magic numbers #6

Open JBanks opened 2 years ago

JBanks commented 2 years ago

https://github.com/L1NNA/I-NEED-A-NAME/blob/c51d235acbcdaa7a90136d3fff83d2665244ed4c/pkg/src/sys.rs#L785-L789

What do false and 0 mean? We should probably add some enums for this for the sake of code readability.

https://github.com/L1NNA/I-NEED-A-NAME/blob/c51d235acbcdaa7a90136d3fff83d2665244ed4c/pkg/src/sys.rs#L277-L301 Perhaps we can add an enum for the mode codes as well. Then we aren't just sending "4" and not understanding what the code is supposed to do.

steven-hh-ding commented 2 years ago

see #13 for an attempted fix.

JBanks commented 2 years ago
image

Taken from Review and Rationale of MIL-STD-1553 A and B