updated drift

This commit is contained in:
Peli 2019-09-30 14:33:57 -07:00
parent 3012068986
commit cb816c91ad

View File

@ -187,13 +187,13 @@ namespace sensors {
// clear drift
this.setMode(GyroSensorMode.Rate);
this._drift = 0;
const n = 100;
const n = 10;
let d = 0;
for (let i = 0; i < n; ++i) {
d += this._query();
pause(4);
pause(20);
}
this._drift = Math.round(d / n);
this._drift = d / n;
}
_info(): string {