Correct the maxlen
This commit is contained in:
1 parent
71631f5aa2
commit
013e09b290
1 file changed
+4
-2
@@ -1543,8 +1543,10 @@ class Scratch3WeDo2Blocks {
|
||||
_isTilted (direction) {
|
||||
switch (direction) {
|
||||
case WeDo2TiltDirection.ANY:
|
||||
return (this._peripheral.tiltX > 45 ? 256 - this._peripheral.tiltX : this._peripheral.tiltX) >= Scratch3WeDo2Blocks.TILT_THRESHOLD ||
|
||||
(this._peripheral.tiltY > 45 ? 256 - this._peripheral.tiltY : this._peripheral.tiltY) >= Scratch3WeDo2Blocks.TILT_THRESHOLD;
|
||||
return (this._peripheral.tiltX > 45 ? 256 - this._peripheral.tiltX : this._peripheral.tiltX)
|
||||
>= Scratch3WeDo2Blocks.TILT_THRESHOLD ||
|
||||
(this._peripheral.tiltY > 45 ? 256 - this._peripheral.tiltY : this._peripheral.tiltY)
|
||||
>= Scratch3WeDo2Blocks.TILT_THRESHOLD;
|
||||
default:
|
||||
return this._getTiltAngle(direction) >= Scratch3WeDo2Blocks.TILT_THRESHOLD;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user