mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
turning on strict mode for various js files
This commit is contained in:
parent
01769559cc
commit
d9c315338d
12 changed files with 140 additions and 98 deletions
|
@ -1,18 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
function request_delay_balancer(refresh_period) {
|
||||
this.balance_to = refresh_period;
|
||||
this.request_t = 0;
|
||||
this.finished_t = 0;
|
||||
}
|
||||
|
||||
request_delay_balancer.prototype.requested = function() {
|
||||
request_delay_balancer.prototype.requested = function () {
|
||||
this.request_t = millitime();
|
||||
};
|
||||
|
||||
request_delay_balancer.prototype.finished = function() {
|
||||
request_delay_balancer.prototype.finished = function () {
|
||||
this.finished_t = millitime();
|
||||
};
|
||||
|
||||
request_delay_balancer.prototype.estimate = function() {
|
||||
request_delay_balancer.prototype.estimate = function () {
|
||||
var estimate = this.balance_to - (this.finished_t - this.request_t);
|
||||
return (estimate > 0) ? estimate : 0;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue