mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-06 11:10:30 -04:00
EV3 populate distance from either IR or UltraSonic sensor.
This commit is contained in:
parent
d47ea58bc3
commit
a8a122cb30
1 changed files with 4 additions and 1 deletions
|
@ -111,6 +111,7 @@ const Ev3Device = {
|
||||||
29: 'color',
|
29: 'color',
|
||||||
30: 'ultrasonic',
|
30: 'ultrasonic',
|
||||||
32: 'gyro',
|
32: 'gyro',
|
||||||
|
33: 'ir',
|
||||||
16: 'touch',
|
16: 'touch',
|
||||||
8: 'mediumMotor',
|
8: 'mediumMotor',
|
||||||
7: 'largeMotor',
|
7: 'largeMotor',
|
||||||
|
@ -129,6 +130,7 @@ const Ev3Mode = {
|
||||||
touch: 0, // touch
|
touch: 0, // touch
|
||||||
color: 1, // ambient
|
color: 1, // ambient
|
||||||
ultrasonic: 1, // inch
|
ultrasonic: 1, // inch
|
||||||
|
ir: 0, // proximity
|
||||||
none: 0
|
none: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,7 +142,8 @@ const Ev3Mode = {
|
||||||
const Ev3Label = {
|
const Ev3Label = {
|
||||||
touch: 'button',
|
touch: 'button',
|
||||||
color: 'brightness',
|
color: 'brightness',
|
||||||
ultrasonic: 'distance'
|
ultrasonic: 'distance',
|
||||||
|
ir: 'distance'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue