Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

로봇아이 블록 수정/추가 #2802

Merged
merged 9 commits into from
Aug 23, 2024
3 changes: 2 additions & 1 deletion src/playground/blocks/hardware/block_robotis.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Entry.Robotis_carCont = {
return script.callReturn();
}
// clear portData only if not RB-100 practical kit
if (Entry.hw.hwModule.id != "7.A,7.B") {
if (Entry.hw.hwModule.id != "7.A,7.B" &&
Entry.hw.hwModule.id != "7.C" ) {
Entry.hw.portData = {};
}
setTimeout(function() {
Expand Down
9 changes: 9 additions & 0 deletions src/playground/blocks/hardware/block_robotisRBKoala.js
Original file line number Diff line number Diff line change
Expand Up @@ -2716,6 +2716,11 @@ Entry.Robotis_rb_koala.getBlocks = function() {

return 0;
}

if (device_id_name == "DIST_110_DISTANCE") {
if (result > 1000) result = 1000;
}

return result;
},
syntax: {
Expand Down Expand Up @@ -2806,6 +2811,10 @@ Entry.Robotis_rb_koala.getBlocks = function() {
return false;
}

if (device_id_name == "DIST_110_DISTANCE") {
if (result > 1000) result = 1000;
}

switch(compareOP) {
case 0:
return result > compareValue;
Expand Down
Loading
Loading