gyro reset fix
This commit is contained in:
parent
6fb5c54280
commit
1453b7e0a3
@ -310,7 +310,7 @@ namespace sensors.internal {
|
|||||||
return getUartNumber(fmt, off, this._port)
|
return getUartNumber(fmt, off, this._port)
|
||||||
}
|
}
|
||||||
|
|
||||||
protected reset() {
|
reset() {
|
||||||
if (this.isActive()) uartReset(this._port);
|
if (this.isActive()) uartReset(this._port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ namespace sensors {
|
|||||||
// may be triggered by a button click, give time to settle
|
// may be triggered by a button click, give time to settle
|
||||||
loops.pause(500);
|
loops.pause(500);
|
||||||
// send a reset command
|
// send a reset command
|
||||||
this.reset();
|
super.reset();
|
||||||
// we need to switch mode twice to perform a calibration
|
// we need to switch mode twice to perform a calibration
|
||||||
if (this.mode == GyroSensorMode.Rate)
|
if (this.mode == GyroSensorMode.Rate)
|
||||||
this.setMode(GyroSensorMode.Angle);
|
this.setMode(GyroSensorMode.Angle);
|
||||||
|
Loading…
Reference in New Issue
Block a user