From ccd3c573f431278a3e7a9cc62a06dab3b1168c5f Mon Sep 17 00:00:00 2001 From: SirTechington <> Date: Sun, 1 Dec 2019 21:48:52 -0500 Subject: [PATCH] EV3 populate distance from either IR or UltraSonic sensor. --- src/extensions/scratch3_ev3/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extensions/scratch3_ev3/index.js b/src/extensions/scratch3_ev3/index.js index 7803f2394e3..05eba222a3a 100644 --- a/src/extensions/scratch3_ev3/index.js +++ b/src/extensions/scratch3_ev3/index.js @@ -111,6 +111,7 @@ const Ev3Device = { 29: 'color', 30: 'ultrasonic', 32: 'gyro', + 33: 'ir', 16: 'touch', 8: 'mediumMotor', 7: 'largeMotor', @@ -129,6 +130,7 @@ const Ev3Mode = { touch: 0, // touch color: 1, // ambient ultrasonic: 1, // inch + ir: 0, // proximity none: 0 }; @@ -140,7 +142,8 @@ const Ev3Mode = { const Ev3Label = { touch: 'button', color: 'brightness', - ultrasonic: 'distance' + ultrasonic: 'distance', + ir: 'distance' }; /**