",
- "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:
- Logischer Wert: »wahr«, wenn der Pin berührt wird, sonst »falsch«.
-
»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:
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 =