From 526681b4311f2b7aef19603d29f0d042eb18e606 Mon Sep 17 00:00:00 2001 From: Beate Jost Date: Wed, 26 Jun 2024 14:50:40 +0200 Subject: [PATCH] Issue #1631: fix - firmware hex path - pin getValue - remove some ";" in code generation - improve help for logo touch sensor - add rssi sensor in getSample - add color sensor in getSample - add callibot keysensor in getSample - revise beta labels --- .../syntax/sensor/generic/ColorSensor.java | 2 +- .../src/main/resources/openRoberta.properties | 2 +- .../actor_dualmotor_without_pin.txt | 4 +- .../calliope2016/actor_ledbar_without_pin.txt | 2 +- ...singlemotor_and_motionkit_without_pins.txt | 4 +- .../actor_dualmotor_without_pin.txt | 4 +- .../calliope2017/actor_ledbar_without_pin.txt | 2 +- ...singlemotor_and_motionkit_without_pins.txt | 4 +- .../actor_dualmotor_without_pin.txt | 4 +- .../actor_ledbar_without_pin.txt | 2 +- ...singlemotor_and_motionkit_without_pins.txt | 4 +- .../calliope2016/actor_ledbar_without_pin.cpp | 1 + .../calliope2017/actor_ledbar_without_pin.cpp | 1 + .../actor_ledbar_without_pin.cpp | 1 + .../targetLanguage/edison/math_lists.py | 1 - .../blockly/blockly_compressed.js | 9 ++-- .../staticResources/blockly/msg/js/de.js | 2 +- .../staticResources/blockly/msg/json/en.json | 2 +- .../help/progHelp_calliope_de.html | 4 +- .../help/progHelp_calliope_en.html | 4 +- .../src/main/resources/mbot2.properties | 1 - RobotEV3/src/main/resources/ev3dev.properties | 1 - RobotEV3/src/main/resources/xNN.properties | 1 - .../sensor/mbed/CallibotKeysSensor.java | 3 +- .../syntax/sensor/mbed/RadioRssiSensor.java | 3 +- .../codegen/CalliopeV3PythonVisitor.java | 43 +++++++++++++++---- .../src/main/resources/calliopev3.properties | 3 +- .../src/main/resources/robotino.properties | 1 - .../src/main/resources/spike.properties | 1 - 29 files changed, 71 insertions(+), 45 deletions(-) diff --git a/OpenRobertaRobot/src/main/java/de/fhg/iais/roberta/syntax/sensor/generic/ColorSensor.java b/OpenRobertaRobot/src/main/java/de/fhg/iais/roberta/syntax/sensor/generic/ColorSensor.java index 190e0fd158..9ce68b40ba 100644 --- a/OpenRobertaRobot/src/main/java/de/fhg/iais/roberta/syntax/sensor/generic/ColorSensor.java +++ b/OpenRobertaRobot/src/main/java/de/fhg/iais/roberta/syntax/sensor/generic/ColorSensor.java @@ -7,7 +7,7 @@ import de.fhg.iais.roberta.util.ast.ExternalSensorBean; @NepoExpr(name = "COLOR_SENSING", category = "SENSOR", blocklyNames = {"robsensors_colourtcs3472_getsample", "sim_colour_getSample", "robSensors_colour_getSample"}, - sampleValues = {@F2M(field = "COLOUR_COLOUR", mode = "COLOUR"), @F2M(field = "COLOUR_AMBIENTLIGHT", mode = "AMBIENTLIGHT"), @F2M(field = "COLOUR_LIGHT", mode = "LIGHT"), @F2M(field = "COLOUR_REDCHANNEL", mode = "REDCHANNEL"), @F2M(field = "COLOUR_GREENCHANNEL", mode = "GREENCHANNEL"), @F2M(field = "COLOUR_BLUECHANNEL", mode = "BLUECHANNEL"), @F2M(field = "CAMERA_COLOUR", mode = "COLOUR")}) + sampleValues = {@F2M(field = "COLOUR_COLOUR", mode = "COLOUR"), @F2M(field = "COLOUR_AMBIENTLIGHT", mode = "AMBIENTLIGHT"), @F2M(field = "COLOUR_LIGHT", mode = "LIGHT"), @F2M(field = "COLOUR_REDCHANNEL", mode = "REDCHANNEL"), @F2M(field = "COLOUR_GREENCHANNEL", mode = "GREENCHANNEL"), @F2M(field = "COLOUR_BLUECHANNEL", mode = "BLUECHANNEL"), @F2M(field = "CAMERA_COLOUR", mode = "COLOUR"), @F2M(field = "COLOURTCS3472_COLOUR", mode = "COLOUR"), @F2M(field = "COLOURTCS3472_LIGHT", mode = "LIGHT"), @F2M(field = "COLOURTCS3472_RGB", mode = "RGB")}) public final class ColorSensor extends ExternalSensor { public ColorSensor(BlocklyProperties properties, ExternalSensorBean externalSensorBean) { diff --git a/OpenRobertaServer/src/main/resources/openRoberta.properties b/OpenRobertaServer/src/main/resources/openRoberta.properties index 403ac8deb2..f26c9c09c0 100644 --- a/OpenRobertaServer/src/main/resources/openRoberta.properties +++ b/OpenRobertaServer/src/main/resources/openRoberta.properties @@ -52,7 +52,7 @@ server.staticresources.dir = OpenRobertaServer/staticResources # For instance, if your school offers nxt, calliope2017 and calliope2016 robots, use this white list: # robot.whitelist = sim, nxt, calliope2017, calliope2016 # Usually overwritten by command line parameter -d -robot.whitelist = txt4, spike, spikePybricks, thymio, wedo, ev3lejosv1, ev3dev, ev3c4ev3, xNN, nxt, microbit, microbitv2, joycar, botnroll, nao, bob3, rob3rta, sensebox, mbot, mbot2, edison, festobionic, festobionicflower, uno, unowifirev2, nano, mega, nano33ble, calliope2017NoBlue, calliope2017, calliope2016, calliopev3, robotino +robot.whitelist = txt4, spike, spikePybricks, thymio, wedo, ev3lejosv1, ev3dev, ev3c4ev3, xNN, nxt, microbit, microbitv2, joycar, botnroll, nao, bob3, rob3rta, sensebox, mbot, mbot2, edison, festobionic, festobionicflower, uno, nano, mega, nano33ble, calliope2017NoBlue, calliope2017, calliope2016, calliopev3, robotino robot.default = ev3lejosv1 # account activation / verification / reset # server.iptocountry.dir path where the db is located, db name is fix: IpToCountry.cvs diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_dualmotor_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_dualmotor_without_pin.txt index f247bba6b3..0ae379ffc4 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_dualmotor_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_dualmotor_without_pin.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR]] +[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR]] Methods: -[SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_ledbar_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_ledbar_without_pin.txt index ab11562622..674ac9c5b0 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_ledbar_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actor_ledbar_without_pin.txt @@ -3,4 +3,4 @@ Sensors: Actors: [UsedActor [, LED_BAR]] Methods: -[] \ No newline at end of file +[LED_BAR_SET_LED] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actors_singlemotor_and_motionkit_without_pins.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actors_singlemotor_and_motionkit_without_pins.txt index 1648fd7f7e..d7c5ed28b6 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actors_singlemotor_and_motionkit_without_pins.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2016/actors_singlemotor_and_motionkit_without_pins.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] +[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] Methods: -[SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_dualmotor_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_dualmotor_without_pin.txt index f247bba6b3..0ae379ffc4 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_dualmotor_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_dualmotor_without_pin.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR]] +[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR]] Methods: -[SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_ledbar_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_ledbar_without_pin.txt index ab11562622..674ac9c5b0 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_ledbar_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actor_ledbar_without_pin.txt @@ -3,4 +3,4 @@ Sensors: Actors: [UsedActor [, LED_BAR]] Methods: -[] \ No newline at end of file +[LED_BAR_SET_LED] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actors_singlemotor_and_motionkit_without_pins.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actors_singlemotor_and_motionkit_without_pins.txt index 1648fd7f7e..d7c5ed28b6 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actors_singlemotor_and_motionkit_without_pins.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017/actors_singlemotor_and_motionkit_without_pins.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] +[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] Methods: -[SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_dualmotor_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_dualmotor_without_pin.txt index f247bba6b3..0ae379ffc4 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_dualmotor_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_dualmotor_without_pin.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR]] +[UsedActor [, DIFFERENTIALDRIVE], UsedActor [m1, MOTOR], UsedActor [m2, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR]] Methods: -[SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_BOTH_MOTORS, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_ledbar_without_pin.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_ledbar_without_pin.txt index ab11562622..674ac9c5b0 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_ledbar_without_pin.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actor_ledbar_without_pin.txt @@ -3,4 +3,4 @@ Sensors: Actors: [UsedActor [, LED_BAR]] Methods: -[] \ No newline at end of file +[LED_BAR_SET_LED] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actors_singlemotor_and_motionkit_without_pins.txt b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actors_singlemotor_and_motionkit_without_pins.txt index 1648fd7f7e..d7c5ed28b6 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actors_singlemotor_and_motionkit_without_pins.txt +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/collectorResults/calliope2017NoBlue/actors_singlemotor_and_motionkit_without_pins.txt @@ -1,6 +1,6 @@ Sensors: [] Actors: -[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] +[UsedActor [m1, MOTOR], UsedActor [S, SERVOMOTOR], UsedActor [, SERVOMOTOR], UsedActor [C17, MOTIONKIT], UsedActor [C16, MOTIONKIT], UsedActor [, MOTIONKIT]] Methods: -[SET_MOTOR] \ No newline at end of file +[SERVO_GET_ANGLE, SET_MOTOR] \ No newline at end of file diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2016/actor_ledbar_without_pin.cpp b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2016/actor_ledbar_without_pin.cpp index ab7768a4ca..30d3de2f0c 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2016/actor_ledbar_without_pin.cpp +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2016/actor_ledbar_without_pin.cpp @@ -12,6 +12,7 @@ Grove_LED_Bar _ledBar(MICROBIT_PIN_P8, MICROBIT_PIN_P2); void ____lights(); + double ___n; int main() diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017/actor_ledbar_without_pin.cpp b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017/actor_ledbar_without_pin.cpp index ab7768a4ca..30d3de2f0c 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017/actor_ledbar_without_pin.cpp +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017/actor_ledbar_without_pin.cpp @@ -12,6 +12,7 @@ Grove_LED_Bar _ledBar(MICROBIT_PIN_P8, MICROBIT_PIN_P2); void ____lights(); + double ___n; int main() diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017NoBlue/actor_ledbar_without_pin.cpp b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017NoBlue/actor_ledbar_without_pin.cpp index ab7768a4ca..30d3de2f0c 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017NoBlue/actor_ledbar_without_pin.cpp +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/calliope2017NoBlue/actor_ledbar_without_pin.cpp @@ -12,6 +12,7 @@ Grove_LED_Bar _ledBar(MICROBIT_PIN_P8, MICROBIT_PIN_P2); void ____lights(); + double ___n; int main() diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/edison/math_lists.py b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/edison/math_lists.py index 17582ded10..19002dc247 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/edison/math_lists.py +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/robotSpecific/targetLanguage/edison/math_lists.py @@ -94,4 +94,3 @@ def sum(list): for i in range(listLength): listSum = (listSum + list[i]) return listSum - diff --git a/OpenRobertaServer/staticResources/blockly/blockly_compressed.js b/OpenRobertaServer/staticResources/blockly/blockly_compressed.js index f185c4a59f..b312399f5c 100644 --- a/OpenRobertaServer/staticResources/blockly/blockly_compressed.js +++ b/OpenRobertaServer/staticResources/blockly/blockly_compressed.js @@ -1825,7 +1825,7 @@ Blockly.Msg.NN_LEARN_TRAINING_LOSS="Training loss";Blockly.Msg.NN_LEARN_UPLOAD=" Blockly.Msg.NN_SET_INPUT_NEURON_VALUE="set value input neuron";Blockly.Msg.NN_SET_INPUT_NEURON_VALUE_TOOLTIP="set the value of an input neuron for the next step of the neural network.";Blockly.Msg.NN_SET_WEIGHT="set weight from";Blockly.Msg.NN_SET_WEIGHT_TOOLTIP="change the weight between two neurons.";Blockly.Msg.NN_SHAPE="shape";Blockly.Msg.NN_SHOW_ALL="show all";Blockly.Msg.NN_SHOW_MATH="computation of neuron";Blockly.Msg.NN_SHOW_PRECISION="decimal places";Blockly.Msg.NN_STEP="make one NN step"; Blockly.Msg.NN_STEP_TOOLTIP="retrieve inputs values, execute one step in a neural network, generate values of the output neurons";Blockly.Msg.NN_TARGET="to";Blockly.Msg.NN_TEST_TRAIN_DATA_UPLOAD_SUCCESS="Uploaded $ test/training data statements";Blockly.Msg.NN_TITLE_TEST_DATA="test data";Blockly.Msg.NN_TITLE_TRAINING_DATA="training data";Blockly.Msg.NN_USED_NEURONNAME="neuron name in use";Blockly.Msg.NN_WEIGHT="weight";Blockly.Msg.NO="no";Blockly.Msg.NO_CONST_NOT_SUPPORTED="Please use a constant instead of an expression here!"; Blockly.Msg.NXTBRICK_TOOLTIP="Represents the NXT brick with connected actors and sensors. There are also inbuilt actors and sensors available, e.g. buttons, display ...";Blockly.Msg.ODOMETRY_TOOLTIP="Represents the availability of odometry data.";Blockly.Msg.OFF="off";Blockly.Msg.OLDER_THEN_14="I am 16 or older than 16!";Blockly.Msg.OMNIDRIVE_TOOLTIP="Represents an omnidirectional drive system.";Blockly.Msg.ON="on";Blockly.Msg.OPTICAL_TOOLTIP="Represent an optical sensor also called reflected light sensor."; -Blockly.Msg.OPTION_FILE_DOWNLOAD="Download your program as a file";Blockly.Msg.OPTION_WEBUSB="Connect your micro:bit device to the computer
select it in the next popup and click \u00bbConnect\u00ab";Blockly.Msg.ORA_ACCESS_RIGHT_CHANGED="The shared right for user \u00bb$\u00ab is updated!";Blockly.Msg.ORA_ACCESS_RIGHT_DELETED="The shared right for user \u00bb$\u00ab is deleted!";Blockly.Msg.ORA_ACCOUNT_NOT_ACTIVATED_TO_SHARE="Your are not allowed to share. Please activate your account!
Further information ..."; +Blockly.Msg.OPTION_FILE_DOWNLOAD="Download your program as a file";Blockly.Msg.OPTION_WEBUSB="Connect your device to the computer
select it in the next popup and click \u00bbConnect\u00ab";Blockly.Msg.ORA_ACCESS_RIGHT_CHANGED="The shared right for user \u00bb$\u00ab is updated!";Blockly.Msg.ORA_ACCESS_RIGHT_DELETED="The shared right for user \u00bb$\u00ab is deleted!";Blockly.Msg.ORA_ACCOUNT_NOT_ACTIVATED_TO_SHARE="Your are not allowed to share. Please activate your account!
Further information ..."; Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_CONFIGURATION_NOT_FOUND="The robot configuration could not be found on the server.";Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_CONFIGURATION_TRANSFORM_FAILED="The robot configuration could not be transformed into the robots programming language.";Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_COMPILE_FAILED="Your program has errors so it cannot be compiled. The compiler messages are:
{MESSAGE}"; Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_GENERATION_FAILED="The program could not be generated.";Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_GENERATION_FAILED_WITH_PARAMETERS="The program could not be generated. Pin {PIN} is incorrect in block {BLOCK}";Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_NOT_FOUND="The program \u00bb$\u00ab could not be found in the database.";Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_STORE_FAILED="The program could not be saved because of an internal error."; Blockly.Msg.ORA_COMPILERWORKFLOW_ERROR_PROGRAM_TRANSFORM_FAILED="The program could not be transformed into the robots programming language.";Blockly.Msg.ORA_COMPILERWORKFLOW_SUCCESS="The program build succeeded";Blockly.Msg.ORA_CONFIGURATION_DELETE_ERROR="An error has occurred while deleting the robot configuration, please try it again!";Blockly.Msg.ORA_CONFIGURATION_DELETE_SUCCESS="Configuration deleted";Blockly.Msg.ORA_CONFIGURATION_ERROR_ID_INVALID="Configuration name is not a valid identifier."; @@ -1906,7 +1906,7 @@ Blockly.Msg.SENSOR_INFRARED_DISTANCE_GETSAMPLE_TOOLTIP_WEDO="Gets the current re Blockly.Msg.SENSOR_IRSEEKER_RCCODE_GETSAMPLE_TOOLTIP_EDISON="Receives a message from a remote control.";Blockly.Msg.SENSOR_IS_ARM="is arm";Blockly.Msg.SENSOR_IS_PIN="is";Blockly.Msg.SENSOR_IS_PRESSED="pressed?";Blockly.Msg.SENSOR_IS_TILTED="tilted?";Blockly.Msg.SENSOR_IS_TOUCHED="touched?";Blockly.Msg.SENSOR_JOYSTICK="joystick";Blockly.Msg.SENSOR_KEY="button";Blockly.Msg.SENSOR_KEYC="front button";Blockly.Msg.SENSOR_KEYPAD="keypad";Blockly.Msg.SENSOR_KEY_ANY="any";Blockly.Msg.SENSOR_KEY_DOWN="down"; Blockly.Msg.SENSOR_KEY_ENTER="enter";Blockly.Msg.SENSOR_KEY_ESCAPE="escape";Blockly.Msg.SENSOR_KEY_LEFT="left";Blockly.Msg.SENSOR_KEY_PLAY="play";Blockly.Msg.SENSOR_KEY_REC="record";Blockly.Msg.SENSOR_KEY_RIGHT="right";Blockly.Msg.SENSOR_KEY_STOP="stop";Blockly.Msg.SENSOR_KEY_TXT4="Mini-Switch";Blockly.Msg.SENSOR_KEY_UP="up";Blockly.Msg.SENSOR_LIGHT="light sensor";Blockly.Msg.SENSOR_LIGHTVEML="visible/UV light sensor";Blockly.Msg.SENSOR_LIGHTVEML_LIGHT_GETSAMPLE_TOOLTIP="Reads the current value of the visible light sensor in lux. The value is between 0 to 220000 lux."; Blockly.Msg.SENSOR_LIGHTVEML_UVLIGHT_GETSAMPLE_TOOLTIP="Reads the current value of the UV light sensor in \u03bcW/cm\u00b2. The value is between 0 and more than 1000.";Blockly.Msg.SENSOR_LIGHT_LIGHT_GETSAMPLE_TOOLTIP_EDISON="Gets the current reading of the light sensor";Blockly.Msg.SENSOR_LIGHT_LINETRACKER="line tracker";Blockly.Msg.SENSOR_LINE="bottom infrared sensor";Blockly.Msg.SENSOR_LINE_COLOUR_TOOLTIP="Returns the colour of at the specified index (0-3)."; -Blockly.Msg.SENSOR_LINE_INFORMATION_TOOLTIP="Returns a list [position [-100;100], width] of the line at the specified index (0-3).";Blockly.Msg.SENSOR_LINE_JOYCAR="line sensor";Blockly.Msg.SENSOR_LOGOTOUCH="logo sensor";Blockly.Msg.SENSOR_LOGOTOUCH_GETSAMPLE_TOOLTIP="Is the logo touched?";Blockly.Msg.SENSOR_LOGO_MODE_TOOLTIP="Change the touch mode of the logo! In resistive mode, touch the ground and the logo together. In capacitive mode, just touch the logo! The default mode is capacitive touch."; +Blockly.Msg.SENSOR_LINE_INFORMATION_TOOLTIP="Returns a list [position [-100;100], width] of the line at the specified index (0-3).";Blockly.Msg.SENSOR_LINE_JOYCAR="line sensor";Blockly.Msg.SENSOR_LOGOTOUCH="logo touch sensor";Blockly.Msg.SENSOR_LOGOTOUCH_GETSAMPLE_TOOLTIP="Is the logo touched?";Blockly.Msg.SENSOR_LOGO_MODE_TOOLTIP="Change the touch mode of the logo! In resistive mode, touch the ground and the logo together. In capacitive mode, just touch the logo! The default mode is capacitive touch."; Blockly.Msg.SENSOR_LPS22HB="LPS22HB";Blockly.Msg.SENSOR_LSM9DS1="LSM9DS1";Blockly.Msg.SENSOR_MARKERINF_TOOLTIP="Returns the position data as a list [x,y,distance] of a specific marker ID found in cm. If no markers are detected, returns a list of -1.";Blockly.Msg.SENSOR_MOISTURE="moisture sensor";Blockly.Msg.SENSOR_MOISTURE_GETSAMPLE_TOOLTIP="Gets the current reading from the moisture sensor in percent.";Blockly.Msg.SENSOR_MOTION="motion sensor";Blockly.Msg.SENSOR_MOTIONDETECTOR="motion detector"; Blockly.Msg.SENSOR_MOTION_ARDUINO="motion sensor HC-SR501";Blockly.Msg.SENSOR_MOTION_GETSAMPLE_TOOLTIP="Gets the current reading from the motion sensor (true/false).";Blockly.Msg.SENSOR_MS_TIMER="in ms";Blockly.Msg.SENSOR_OBSTACLEDETECTOR="Obstacle detector";Blockly.Msg.SENSOR_ODOMETRY="odometry";Blockly.Msg.SENSOR_ODOMETRY_GETSAMPLE_TOOLTIP="Returns the current position on a specific axis in cm or the orientation. Odometry values are reset every program start."; Blockly.Msg.SENSOR_ODOMETRY_RESET_TOOLTIP="Resets the current position on a specific axis or the orientation.";Blockly.Msg.SENSOR_OPTICAL="optical sensor";Blockly.Msg.SENSOR_OPTICAL_GETSAMPLE_TOOLTIP="Returns the current reading for a optical sensors specific output cable.";Blockly.Msg.SENSOR_OUT="sensor";Blockly.Msg.SENSOR_OUT_ANALOG_GETSAMPLE_TOOLTIP="Returns the value from the specified analog pin. The value is between 0 and 1024.";Blockly.Msg.SENSOR_OUT_DIGITAL_GETSAMPLE_TOOLTIP="Returns the value from the specified digital pin. The value is either HIGH \u00bb1\u00ab or LOW \u00bb0\u00ab."; @@ -2896,7 +2896,7 @@ sensors.colour.nxt={title:"COLOUR",ports:[["Port 1","1"],["Port 2","2"],["Port 3 sensors.colour.spike={title:"COLOUR",modes:[{name:"COLOUR",type:"Colour",value:"#E701A7"},{name:"LIGHT",type:"Number",unit:"PERCENT",value:50},{name:"AMBIENTLIGHT",type:"Number",unit:"PERCENT",value:50},{name:"REDCHANNEL",type:"Number",unit:"PERCENT"},{name:"GREENCHANNEL",type:"Number",unit:"PERCENT"},{name:"BLUECHANNEL",type:"Number",unit:"PERCENT"}],ports:"CONFIGURATION"};sensors.colour.txt4={title:"CAMERA",modes:[{name:"COLOUR",type:"Colour",value:"#b30006"}],ports:"CONFIGURATION",portsHidden:!0}; sensors.compass={};sensors.compass.botnroll={title:"COMPASS",modes:[{name:"ANGLE",type:"Number",unit:"DEGREE"}]};sensors.compass.calliope={title:"COMPASS",modes:[{name:"ANGLE",type:"Number",unit:"DEGREE"}],ports:"CONFIGURATION",portsHidden:!0};sensors.compass.microbit=sensors.compass.calliope;sensors.compass.microbitv2=sensors.compass.calliope;sensors.compass.joycar=sensors.compass.microbitv2; sensors.compass.ev3={title:"COMPASS",modes:[{name:"ANGLE",type:"Number",unit:"DEGREE"},{name:"COMPASS",type:"Number",unit:"DEGREE"}],ports:[["Port 1","1"],["Port 2","2"],["Port 3","3"],["Port 4","4"]],standardPort:"1"};sensors.compass.xNN=sensors.compass.ev3;sensors.compass.sensebox={title:"COMPASS",modes:[{name:"X",type:"Number",unit:"DEGREE"},{name:"Y",type:"Number",unit:"DEGREE"},{name:"Z",type:"Number",unit:"DEGREE"}],ports:"CONFIGURATION"}; -sensors.compass.txt4={title:"IMU",modes:[{name:"MAGNETICFLUX",type:"Number",unit:"DEGREE",op:"NUM_REV",value:0}],slots:[["x","X"],["y","Y"],["z","Z"]],ports:"CONFIGURATION"};sensors.colourtcs3472={};sensors.colourtcs3472.calliope={title:"COLOURTCS3472",modes:[{name:"COLOUR",type:"Colour"},{name:"LIGHT",type:"Number",unit:"PERCENT"},{name:"RGB",type:"Array_Number"}],ports:"CONFIGURATION"};sensors.detectface={}; +sensors.compass.txt4={title:"IMU",modes:[{name:"MAGNETICFLUX",type:"Number",unit:"DEGREE",op:"NUM_REV",value:0}],slots:[["x","X"],["y","Y"],["z","Z"]],ports:"CONFIGURATION"};sensors.colourtcs3472={};sensors.colourtcs3472.calliope={title:"COLOURTCS3472",modes:[{name:"COLOUR",type:"Colour",value:"#cc33cc"},{name:"LIGHT",type:"Number",unit:"PERCENT"},{name:"RGB",type:"Array_Number"}],ports:"CONFIGURATION"};sensors.detectface={}; sensors.detectface.nao={title:"DETECTFACE",modes:[{name:"NAMEONE",type:"String",value:"Roberta"},{name:"NAMEALL",type:"Array_String"}]};sensors.drop={};sensors.drop.arduino={title:"DROP",modes:[{name:"VALUE",type:"Number",unit:"PERCENT"}],ports:"CONFIGURATION"};sensors.drop_off={};sensors.drop_off.vorwerk={title:"DROP_OFF",modes:[{name:"DISTANCE",type:"Number",unit:"CM"}],ports:[["LEFT","LEFT"],["RIGHT","RIGHT"]]};sensors.detectmark={}; sensors.detectmark.nao={title:"DETECTMARK",modes:[{name:"IDONE",type:"Number",value:"84",op:"NUM_EQ"},{name:"IDALL",type:"Array_Number"}]};sensors.detectmark.robotino={title:"DETECTMARK",modes:[{name:"IDALL",type:"Array_Number"}]};sensors.encoder={};sensors.encoder.botnroll={title:"ENCODER",modes:[{name:"DEGREE",type:"Number",unit:"DEGREE"},{name:"ROTATION",type:"Number",unit:""},{name:"DISTANCE",type:"Number",unit:"CM"}],ports:[["A","A"],["B","B"],["C","C"],["D","D"]]}; sensors.encoder.ev3={title:"ENCODER",modes:[{name:"DEGREE",type:"Number",unit:"DEGREE",op:"NUM_REV",value:180},{name:"ROTATION",type:"Number",unit:"",op:"NUM_REV",value:2},{name:"DISTANCE",type:"Number",unit:"CM"}],ports:[["A","A"],["B","B"],["C","C"],["D","D"]],standardPort:"B"};sensors.encoder.xNN=sensors.encoder.ev3;sensors.encoder.mbot2={title:"ENCODER",modes:[{name:"DEGREE",type:"Number",unit:"DEGREE",op:"NUM_REV",value:180},{name:"ROTATION",type:"Number",unit:"",op:"NUM_REV",value:2}],ports:"CONFIGURATION"}; @@ -2961,7 +2961,8 @@ sensors.ultrasonic.nano33ble=sensors.ultrasonic.arduino;sensors.light.nano33ble= sensors.gyro.nano33ble=sensors.gyro.arduino;sensors.accelerometer.nano33ble=sensors.accelerometer.arduino;var sensorsAll=[];sensorsAll.botnroll=[sensors.infrared.botnroll,sensors.light.botnroll,sensors.compass.botnroll,sensors.ultrasonic.botnroll,sensors.colour.botnroll,sensors.key.botnroll];sensorsAll.mbot=[sensors.key.mbot,sensors.ultrasonic.mbot,sensors.infrared.mbot,sensors.light.mbot,sensors.timer.mbot]; sensorsAll.mbot2=[sensors.key.mbot2,sensors.ultrasonic.mbot2,sensors.sound.mbot2,sensors.joystickKeys.mbot2,sensors.light.mbot2,sensors.gyro.mbot2,sensors.accelerometer.mbot2,sensors.timer.mbot2,sensors.quadrgb.mbot2,sensors.line.mbot2,sensors.encoder.mbot2];sensorsAll.ev3=[sensors.touch.ev3,sensors.ultrasonic.ev3,sensors.colour.ev3,sensors.infrared.ev3,sensors.encoder.ev3,sensors.key.ev3,sensors.gyro.ev3,sensors.timer.ev3,sensors.compass.ev3,sensors.irseeker.ev3,sensors.htcolour.ev3,sensors.sound.ev3]; sensorsAll.xNN=[sensors.touch.xNN,sensors.ultrasonic.xNN,sensors.colour.xNN,sensors.infrared.xNN,sensors.encoder.xNN,sensors.key.xNN,sensors.gyro.xNN,sensors.timer.xNN,sensors.compass.xNN,sensors.irseeker.xNN,sensors.htcolour.xNN,sensors.sound.xNN];sensorsAll.nxt=[sensors.touch.nxt,sensors.sound.nxt,sensors.light.nxt,sensors.ultrasonic.nxt,sensors.encoder.nxt,sensors.key.nxt,sensors.colour.nxt,sensors.timer.nxt,sensors.htcolour.nxt]; -sensorsAll.bob3=[sensors.pintouch.bob3,sensors.infrared.bob3,sensors.temperature.bob3,sensors.timer.bob3];sensorsAll.calliope=[sensors.key.calliope,sensors.pintouch.calliope,sensors.gesture.calliope,sensors.compass.calliope,sensors.sound.calliope,sensors.timer.calliope,sensors.temperature.calliope,sensors.light.calliope,sensors.pin.calliope,sensors.gyro.calliope,sensors.accelerometer.calliope,sensors.humidity.calliope,sensors.ultrasonic.calliope,sensors.infrared.calliope]; +sensorsAll.bob3=[sensors.pintouch.bob3,sensors.infrared.bob3,sensors.temperature.bob3,sensors.timer.bob3]; +sensorsAll.calliope=[sensors.key.calliope,sensors.pintouch.calliope,sensors.logotouch.calliope,sensors.gesture.calliope,sensors.compass.calliope,sensors.sound.calliope,sensors.timer.calliope,sensors.temperature.calliope,sensors.light.calliope,sensors.pin.calliope,sensors.rssi.calliope,sensors.gyro.calliope,sensors.accelerometer.calliope,sensors.humidity.calliope,sensors.ultrasonic.calliope,sensors.infrared.calliope,sensors.keyc.calliope,sensors.colourtcs3472.calliope]; sensorsAll.microbit=[sensors.key.microbit,sensors.pintouch.microbit,sensors.gesture.microbit,sensors.compass.microbit,sensors.timer.microbit,sensors.temperature.microbit,sensors.pin.microbit,sensors.accelerometer.microbit,sensors.light.microbit]; sensorsAll.microbitv2=[sensors.key.microbitv2,sensors.pintouch.microbitv2,sensors.logotouch.microbitv2,sensors.gesture.microbitv2,sensors.sound.microbitv2,sensors.compass.microbitv2,sensors.timer.microbitv2,sensors.temperature.microbitv2,sensors.pin.microbitv2,sensors.accelerometer.microbitv2,sensors.light.microbitv2]; sensorsAll.joycar=[sensors.key.joycar,sensors.ultrasonic.joycar,sensors.infrared.joycar,sensors.line.joycar,sensors.logotouch.joycar,sensors.sound.joycar,sensors.compass.joycar,sensors.timer.joycar,sensors.encoder.joycar,sensors.temperature.joycar,sensors.accelerometer.joycar,sensors.light.joycar,sensors.pin.joycar,sensors.gesture.joycar]; diff --git a/OpenRobertaServer/staticResources/blockly/msg/js/de.js b/OpenRobertaServer/staticResources/blockly/msg/js/de.js index d26d55d582..b8102f2a14 100644 --- a/OpenRobertaServer/staticResources/blockly/msg/js/de.js +++ b/OpenRobertaServer/staticResources/blockly/msg/js/de.js @@ -1192,7 +1192,7 @@ Blockly.Msg.OLDER_THEN_14 = "Ich bin 16 oder älter!"; Blockly.Msg.OMNIDRIVE_TOOLTIP = "Block für das omnidirektionale Antriebssystem auch Omnidrive genannt."; Blockly.Msg.ON = "an"; Blockly.Msg.OPTICAL_TOOLTIP = "Block für den optischen Sensor auch Reflexlichttaster genannt."; -Blockly.Msg.OPTION_FILE_DOWNLOAD = "Laden dein Programm als Datei herunter"; +Blockly.Msg.OPTION_FILE_DOWNLOAD = "Lade dein Programm als Datei herunter"; Blockly.Msg.OPTION_WEBUSB = "Verbinde dein System mit dem Computer,
wähle es im nächsten Popup aus und klicke auf »Verbinden«"; Blockly.Msg.ORA_ACCESS_RIGHT_CHANGED = "Das Programm wurde mit »$« geteilt."; Blockly.Msg.ORA_ACCESS_RIGHT_DELETED = "Das Programm wird nun nicht mehr mit »$« geteilt!"; diff --git a/OpenRobertaServer/staticResources/blockly/msg/json/en.json b/OpenRobertaServer/staticResources/blockly/msg/json/en.json index 7aeae49eb1..01f08c5f1f 100644 --- a/OpenRobertaServer/staticResources/blockly/msg/json/en.json +++ b/OpenRobertaServer/staticResources/blockly/msg/json/en.json @@ -1,7 +1,7 @@ { "@metadata": { "author": "Ellen Spertus ", - "lastupdated": "2024-06-25 18:01:29.809117", + "lastupdated": "2024-06-26 08:32:49.529183", "locale": "en", "messagedocumentation" : "qqq" }, diff --git a/OpenRobertaServer/staticResources/help/progHelp_calliope_de.html b/OpenRobertaServer/staticResources/help/progHelp_calliope_de.html index d98a65b334..511ab8d959 100644 --- a/OpenRobertaServer/staticResources/help/progHelp_calliope_de.html +++ b/OpenRobertaServer/staticResources/help/progHelp_calliope_de.html @@ -100,9 +100,9 @@

Rückgabewert:

»Logosensor gedrückt?«

Mit diesem Block kannst du den Berührungssensor des Micro:bit abfragen, ob er gerade gedrückt wird.

Rückgabewerte: +

»Logo-Touch-Sensor gedrückt?«

Mit diesem Block kannst du den Logo-Touch-Sensor (auf der Rückseite) abfragen, ob er gerade gedrückt wird.

Rückgabewerte:

    -
  • Wahrheitswert, »wahr«, wenn die Taste gedrückt wird, sonst »falsch«.
  • +
  • Wahrheitswert, »wahr«, wenn auf das Logo gedrückt wird, sonst »falsch«.

»gib ... Lage«

Mit dem Block »gib ... Lage« kannst du einem anderen Block »mitteilen«, ob sich der Calliope mini in einer bestimmten Lage befindet. Dieser Block fragt den eingebauten Gyrosensor des Calliope mini ab.

Befindet sich der Calliope mini in der abgefragten Lage liefert der »gib ... Lage« Block »wahr«, sonst »falsch«.

Einstellmöglichkeiten:

  • Option, wähle die Lage, die abgefragt werden soll. Mögliche Lagen:

    • aufrecht: USB-Anschluss des Calliope mini zeigt nach oben
    • kopfüber: USB-Anschluss des Calliope mini zeigt nach unten
    • auf der Vorderseite: Calliope-Beschriftung zeigt nach unten
    • auf der Rückseite: Calliope-Beschriftung zeigt nach oben
    • geschüttelt: Calliope mini wird geschüttelt
    • frei fallend: Calliope mini wird nach unten beschleunigt
  • diff --git a/OpenRobertaServer/staticResources/help/progHelp_calliope_en.html b/OpenRobertaServer/staticResources/help/progHelp_calliope_en.html index 97d83db7b6..a0beda5c6d 100644 --- a/OpenRobertaServer/staticResources/help/progHelp_calliope_en.html +++ b/OpenRobertaServer/staticResources/help/progHelp_calliope_en.html @@ -100,9 +100,9 @@

Return value:

  • Logical value: »true«, if the pin is touched, »false« else.
  • -

»logo sensor pressed?«

With this block, you can query the touch sensor of the Micro:bit to see if it is currently being pressed.

Return values: +

»logo touch sensor pressed?«

With this block, you can query the logo touch sensor to see if it is currently being touched.

Return values:

    -
  • Truth value, "true" if the key is pressed, "false" otherwise.
  • +
  • Truth value, "true" if the logo is touched, "false" otherwise.

»gesture ... aktive?«

With the block »gesture ... aktive?« you can "tell" another block whether the Calliope is in a specific gesture or not .

If the Calliope is in the checked gesture the return value will be true. If not it will be false.

Settings:

  • gesture to be checked.
  • diff --git a/RobotCyberpi/src/main/resources/mbot2.properties b/RobotCyberpi/src/main/resources/mbot2.properties index 6402e92c9f..57c278bbe7 100644 --- a/RobotCyberpi/src/main/resources/mbot2.properties +++ b/RobotCyberpi/src/main/resources/mbot2.properties @@ -11,7 +11,6 @@ robot.configuration.default = /mbot2/configuration.default.xml robot.real.name = mBot 2 #TODO: fix all the create agent parameters robot.vendor = na -robot.announcement = beta # robot's info for further information robot.info.en = https://education.makeblock.com/mbot2/ robot.configuration = true diff --git a/RobotEV3/src/main/resources/ev3dev.properties b/RobotEV3/src/main/resources/ev3dev.properties index 9dd7f4ebdb..c670bcceb6 100644 --- a/RobotEV3/src/main/resources/ev3dev.properties +++ b/RobotEV3/src/main/resources/ev3dev.properties @@ -7,7 +7,6 @@ robot.plugin.fileExtension.binary = py robot.real.name = EV3dev robot.vendor = na -# robot.announcement = beta # robot's info for further information robot.info.en = http://www.ev3dev.org/ diff --git a/RobotEV3/src/main/resources/xNN.properties b/RobotEV3/src/main/resources/xNN.properties index fbe9d18775..e725032326 100644 --- a/RobotEV3/src/main/resources/xNN.properties +++ b/RobotEV3/src/main/resources/xNN.properties @@ -17,7 +17,6 @@ robot.configuration.old.toplevelblock = robBrick_EV3-Brick # robot's long name to display robot.real.name = Open Roberta xNN robot.vendor = na -robot.announcement = beta # robot's info for further information robot.info.en = https://lejos.sourceforge.io/ev3.php robot.multisim = true diff --git a/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/CallibotKeysSensor.java b/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/CallibotKeysSensor.java index a62f7c29f9..4c06312157 100644 --- a/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/CallibotKeysSensor.java +++ b/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/CallibotKeysSensor.java @@ -1,11 +1,12 @@ package de.fhg.iais.roberta.syntax.sensor.mbed; import de.fhg.iais.roberta.syntax.sensor.ExternalSensor; +import de.fhg.iais.roberta.transformer.forClass.F2M; import de.fhg.iais.roberta.transformer.forClass.NepoExpr; import de.fhg.iais.roberta.util.ast.BlocklyProperties; import de.fhg.iais.roberta.util.ast.ExternalSensorBean; -@NepoExpr(name = "CALLIBOT_KEYS_SENSING", category = "SENSOR", blocklyNames = {"robSensors_keyc_getSample"}) +@NepoExpr(name = "CALLIBOT_KEYS_SENSING", category = "SENSOR", blocklyNames = {"robSensors_keyc_getSample"}, sampleValues = {@F2M(field = "KEYC_PRESSED", mode = "PRESSED")}) public final class CallibotKeysSensor extends ExternalSensor { public CallibotKeysSensor(BlocklyProperties properties, ExternalSensorBean externalSensorBean) { diff --git a/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/RadioRssiSensor.java b/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/RadioRssiSensor.java index 9f48ea207f..0b516f4613 100644 --- a/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/RadioRssiSensor.java +++ b/RobotMbed/src/main/java/de/fhg/iais/roberta/syntax/sensor/mbed/RadioRssiSensor.java @@ -1,12 +1,13 @@ package de.fhg.iais.roberta.syntax.sensor.mbed; import de.fhg.iais.roberta.syntax.sensor.ExternalSensor; +import de.fhg.iais.roberta.transformer.forClass.F2M; import de.fhg.iais.roberta.transformer.forClass.NepoExpr; import de.fhg.iais.roberta.typecheck.BlocklyType; import de.fhg.iais.roberta.util.ast.BlocklyProperties; import de.fhg.iais.roberta.util.ast.ExternalSensorBean; -@NepoExpr(name = "RADIO_RSSI", category = "SENSOR", blocklyNames = {"robSensors_rssi_getSample"}, blocklyType = BlocklyType.NUMBER) +@NepoExpr(name = "RADIO_RSSI", category = "SENSOR", blocklyNames = {"robSensors_rssi_getSample"}, sampleValues = {@F2M(field = "RSSI_VALUE", mode = "VALUE")}, blocklyType = BlocklyType.NUMBER) public final class RadioRssiSensor extends ExternalSensor { public RadioRssiSensor(BlocklyProperties properties, ExternalSensorBean externalSensorBean) { diff --git a/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/CalliopeV3PythonVisitor.java b/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/CalliopeV3PythonVisitor.java index 7f3c112b8f..8be986f428 100644 --- a/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/CalliopeV3PythonVisitor.java +++ b/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/CalliopeV3PythonVisitor.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -41,6 +42,7 @@ import de.fhg.iais.roberta.syntax.sensor.generic.GyroSensor; import de.fhg.iais.roberta.syntax.sensor.generic.HumiditySensor; import de.fhg.iais.roberta.syntax.sensor.generic.InfraredSensor; +import de.fhg.iais.roberta.syntax.sensor.generic.PinGetValueSensor; import de.fhg.iais.roberta.syntax.sensor.generic.UltrasonicSensor; import de.fhg.iais.roberta.syntax.sensor.mbed.CallibotKeysSensor; import de.fhg.iais.roberta.syntax.sensor.mbed.RadioRssiSensor; @@ -61,7 +63,6 @@ public class CalliopeV3PythonVisitor extends MbedV2PythonVisitor implements ICal PIN_MAP.put("3", "pin3"); PIN_MAP.put("4", "pin_A0_SCL"); PIN_MAP.put("5", "pin_A1_RX"); - PIN_MAP.put("6", "pin_A1_TX"); PIN_MAP.put("C04", "pin4"); PIN_MAP.put("C05", "pin5"); PIN_MAP.put("C06", "pin6"); @@ -71,8 +72,8 @@ public class CalliopeV3PythonVisitor extends MbedV2PythonVisitor implements ICal PIN_MAP.put("C10", "pin10"); PIN_MAP.put("C11", "pin11"); PIN_MAP.put("C12", "pin12"); - PIN_MAP.put("C16", "pin16"); - PIN_MAP.put("C17", "pin17"); + PIN_MAP.put("C16", "pin_A1_RX"); + PIN_MAP.put("C17", "pin_A1_TX"); PIN_MAP.put("C18", "pin18"); PIN_MAP.put("C19", "pin19"); @@ -383,7 +384,31 @@ public Void visitMbedPinWriteValueAction(MbedPinWriteValueAction mbedPinWriteVal String valueType = mbedPinWriteValueAction.pinValue.equals(SC.DIGITAL) ? "digital(" : "analog("; this.src.add(".write_", valueType); mbedPinWriteValueAction.value.accept(this); - this.src.add(");"); + this.src.add(")"); + return null; + } + + @Override + public Void visitPinGetValueSensor(PinGetValueSensor pinValueSensor) { + String port = pinValueSensor.getUserDefinedPort(); + ConfigurationComponent configurationComponent = this.robotConfiguration.getConfigurationComponent(port); + String pin1 = configurationComponent.getProperty("PIN1"); + String valueType = pinValueSensor.getMode().toLowerCase(Locale.ENGLISH); + if ( valueType.equalsIgnoreCase(SC.PULSEHIGH) ) { + this.src.add("machine.time_pulse_us(" + this.firmware + "."); + this.src.add(PIN_MAP.get(pin1)); + this.src.add(", 1)"); + } else if ( valueType.equalsIgnoreCase(SC.PULSELOW) ) { + this.src.add("machine.time_pulse_us(", this.firmware, "."); + this.src.add(PIN_MAP.get(pin1)); + this.src.add(", 0)"); + } else { + this.src.add(this.firmware, "."); + this.src.add(PIN_MAP.get(pin1)); + this.src.add(".read_"); + this.src.add(valueType); + this.src.add("()"); + } return null; } @@ -450,7 +475,7 @@ public Void visitBothMotorsOnAction(BothMotorsOnAction bothMotorsOnAction) { this.src.add(", "); bothMotorsOnAction.speedA.accept(this); } - this.src.add(");"); + this.src.add(")"); } else { this.src.add(this.getBean(CodeGeneratorSetupBean.class).getHelperMethodGenerator().getHelperMethodName(CalliopeMethods.SET_BOTH_MOTORS), "("); if ( confCompA.getProperty("PIN1").equals("A") ) { @@ -546,12 +571,12 @@ public Void visitServoSetAction(ServoSetAction servoSetAction) { pin = pin.replace("SERVO_S", ""); this.src.add(pin, ", "); servoSetAction.value.accept(this); - this.src.add(");"); + this.src.add(")"); } else { String pin = PIN_MAP.get(confComp.getProperty("PIN1")); this.src.add(this.firmware, ".", pin, ".write_analog(servo_get_angle("); servoSetAction.value.accept(this); - this.src.add("));"); + this.src.add("))"); } return null; } @@ -597,12 +622,12 @@ public Void visitMotionKitSingleSetAction(MotionKitSingleSetAction motionKitSing case SC.FOREWARD: this.src.add(this.firmware, ".", currentPort, ".write_analog(servo_get_angle("); this.src.add(currentPort.equals(rightMotorPort) ? 0 : 180); - this.src.add("));"); + this.src.add("))"); break; case SC.BACKWARD: this.src.add(this.firmware, ".", currentPort, ".write_analog(servo_get_angle("); this.src.add(currentPort.equals(rightMotorPort) ? 180 : 0); - this.src.add("));"); + this.src.add("))"); break; case SC.OFF: this.src.add(this.firmware, ".", currentPort, ".write_analog(0)"); diff --git a/RobotMbed/src/main/resources/calliopev3.properties b/RobotMbed/src/main/resources/calliopev3.properties index 635a25cc51..ea3761cb3f 100644 --- a/RobotMbed/src/main/resources/calliopev3.properties +++ b/RobotMbed/src/main/resources/calliopev3.properties @@ -1,6 +1,6 @@ robot.plugin.group = calliope -robot.factory.default = ../firmware/Calliope +robot.factory.default = firmware/CalliopeV3 robot.plugin.compiler.resources.dir = RobotMbed/ robot.real.name = Calliope mini v3 robot.vendor = 0xd28 @@ -29,6 +29,7 @@ robot.info.en = https://calliope.cc/en/ robot.configuration = true robot.configuration.type = new robot.pluginSim = calliopeV3 +robot.announcement = beta # still necessary for backwards compatibility with old configurations robot.configuration.old.toplevelblock = mbedBrick_Calliope-Brick diff --git a/RobotRobotino/src/main/resources/robotino.properties b/RobotRobotino/src/main/resources/robotino.properties index c77862e59a..acff04bcf1 100644 --- a/RobotRobotino/src/main/resources/robotino.properties +++ b/RobotRobotino/src/main/resources/robotino.properties @@ -3,7 +3,6 @@ robot.plugin.factory = de.fhg.iais.roberta.factory.RobotFactory robot.plugin.compiler.resources.dir = RobotRobotino/ robot.plugin.fileExtension.source = py robot.plugin.fileExtension.binary = py -robot.announcement = beta # robot specific toolboxes, default program and configuration robot.program.toolbox.beginner = /robotino/program.toolbox.beginner.xml diff --git a/RobotSpike/src/main/resources/spike.properties b/RobotSpike/src/main/resources/spike.properties index 07b1bca38b..9c0ea5a65c 100644 --- a/RobotSpike/src/main/resources/spike.properties +++ b/RobotSpike/src/main/resources/spike.properties @@ -13,7 +13,6 @@ robot.configuration.default = /spike/configuration.default.xml robot.real.name = Spike Prime / Robot Inventor / Lego #TODO: fix all the create agent parameters robot.vendor = na -robot.announcement = beta robot.info.en = robot.info.de =