Skip to content

Commit

Permalink
improve fw version recognition of nav modes
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed Jan 1, 2021
1 parent 6812038 commit 6767b00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bblreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ func bblreader(bbfile string, meta BBLSummary) bool {
var basetime time.Time
have_origin := false

INAV_vers := 0
INAV_vers = 0
fwvers := strings.Split(meta.firmware, " ")
if len(fwvers) == 4 {
parts := strings.Split(fwvers[1], ".")
if len(parts) == 3 {
mask := (1 << 16)
for _, p := range parts {
v, _ := strconv.Atoi(p)
INAV_vers |= (v * mask)
INAV_vers = INAV_vers + (v * mask)
mask = mask >> 8
}
}
Expand Down

0 comments on commit 6767b00

Please sign in to comment.