Skip to content

Commit

Permalink
Added warning at the status bar while actual log rate is less then re…
Browse files Browse the repository at this point in the history
…quired (#715)

* added warning at the status bar while actual log rate is less then required

* Update js/graph_spectrum_calc.js

Code style improvement

Co-authored-by: Mark Haslinghuis <[email protected]>

---------

Co-authored-by: Mark Haslinghuis <[email protected]>
  • Loading branch information
demvlad and haslinghuis authored Mar 7, 2024
1 parent 4d98eef commit 1012977
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1712,3 +1712,7 @@ dialog h3 {
padding-right: 9px;
line-height: 28px;
}

.actual-lograte {
color: red;
}
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,9 @@ <h4>Statistics</h4>
<div>
<span class="lograte">-</span>
</div>
<div>
<span class="actual-lograte">-</span>
</div>
<div>
<span class="flight-mode">-</span>
</div>
Expand Down
4 changes: 4 additions & 0 deletions js/graph_spectrum_calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ GraphSpectrumCalc.initialize = function(flightLog, sysConfig) {
this._blackBoxRate = Math.round(this._actualeRate);

if (this._BetaflightRate !== this._blackBoxRate) {
$('.actual-lograte').text(this._actualeRate.toFixed(0) + "/" + this._BetaflightRate.toFixed(0)+"Hz");
return {
actualRate: this._actualeRate,
betaflightRate: this._BetaflightRate,
};
} else {
$('.actual-lograte').text("");
}

return undefined;
};

Expand Down

0 comments on commit 1012977

Please sign in to comment.