Skip to content

Commit d379264

Browse files
committed
EV3のgetDistance,getBrightnessを追加
1 parent 7d7c890 commit d379264

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib/ruby-generator/ev3.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ export default function (Generator) {
6565
return `ev3_button_pressed(${port})\n`;
6666
};
6767

68+
Generator.ev3_getDistance = function () {
69+
return ['ev3_distance', Generator.ORDER_ATOMIC];
70+
};
71+
72+
Generator.ev3_getBrightness = function () {
73+
return ['ev3_brightness', Generator.ORDER_ATOMIC];
74+
};
75+
6876
Generator.ev3_beep = function (block) {
6977
const note = Generator.valueToCode(block, 'NOTE', Generator.ORDER_NONE) || null;
7078
const time = Generator.valueToCode(block, 'TIME', Generator.ORDER_NONE) || null;

0 commit comments

Comments
 (0)