From 697226e21517b8b2965c901c27446ba15b25d3f6 Mon Sep 17 00:00:00 2001 From: heini208 Date: Fri, 12 Jan 2024 10:45:26 +0100 Subject: [PATCH] Issue #1605: add hotfix for JoyCar IC2 ports in default config being invalid. --- .../joycar/action_LED_matrix_on_off_test.xml | 14 +++++++------- .../joycar/action_digital_pin_test.xml | 14 +++++++------- .../robotSpecific/joycar/action_display_test.xml | 14 +++++++------- .../robotSpecific/joycar/action_drive_test.xml | 14 +++++++------- .../joycar/action_drive_turn_steer_block_test.xml | 14 +++++++------- .../joycar/action_move_motor_left_right_test.xml | 14 +++++++------- .../robotSpecific/joycar/action_servo_test.xml | 14 +++++++------- .../robotSpecific/joycar/action_sound_test.xml | 14 +++++++------- .../robotSpecific/joycar/actuib_RGB_test.xml | 14 +++++++------- .../robotSpecific/joycar/colour_test.xml | 14 +++++++------- .../robotSpecific/joycar/messages_test.xml | 14 +++++++------- .../joycar/sensor_accelerometer_test.xml | 14 +++++++------- .../robotSpecific/joycar/sensor_button_test.xml | 14 +++++++------- .../joycar/sensor_distance_sensor_test.xml | 14 +++++++------- .../robotSpecific/joycar/sensor_gestures_test.xml | 14 +++++++------- .../joycar/sensor_infrared_obstacle_test.xml | 14 +++++++------- .../joycar/sensor_line_follower_test.xml | 14 +++++++------- .../joycar/sensor_remaining_sensors_test.xml | 14 +++++++------- .../robotSpecific/joycar/sensor_timer_test.xml | 14 +++++++------- .../visitor/codegen/JoyCarPythonVisitor.java | 2 +- .../resources/joyCar/configuration.default.xml | 14 +++++++------- 21 files changed, 141 insertions(+), 141 deletions(-) diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_LED_matrix_on_off_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_LED_matrix_on_off_test.xml index bd6c91ac25..b06d77f776 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_LED_matrix_on_off_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_LED_matrix_on_off_test.xml @@ -224,31 +224,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_digital_pin_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_digital_pin_test.xml index 847e240275..13184a48e1 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_digital_pin_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_digital_pin_test.xml @@ -121,31 +121,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_display_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_display_test.xml index 21d0f13224..e3e6ee4ffe 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_display_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_display_test.xml @@ -1557,31 +1557,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_test.xml index 40c3d325e0..462eed44aa 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_test.xml @@ -256,31 +256,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_turn_steer_block_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_turn_steer_block_test.xml index 1d545ee520..1395220803 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_turn_steer_block_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_drive_turn_steer_block_test.xml @@ -1130,31 +1130,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_move_motor_left_right_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_move_motor_left_right_test.xml index 1c27d89e56..042fb06987 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_move_motor_left_right_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_move_motor_left_right_test.xml @@ -301,31 +301,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_servo_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_servo_test.xml index 26b8608848..f6f2b9a641 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_servo_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_servo_test.xml @@ -162,31 +162,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_sound_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_sound_test.xml index a794697176..c7e745af9a 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_sound_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/action_sound_test.xml @@ -173,31 +173,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/actuib_RGB_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/actuib_RGB_test.xml index 5275a3c644..b0dcfc2f0f 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/actuib_RGB_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/actuib_RGB_test.xml @@ -316,31 +316,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/colour_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/colour_test.xml index 2a841cb1c0..5956493a30 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/colour_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/colour_test.xml @@ -188,31 +188,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/messages_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/messages_test.xml index ef62e7326f..46f4b5cc81 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/messages_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/messages_test.xml @@ -165,31 +165,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_accelerometer_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_accelerometer_test.xml index 8617306148..4143a03f0b 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_accelerometer_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_accelerometer_test.xml @@ -548,31 +548,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_button_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_button_test.xml index a09ed45d8b..c49ebe9d9c 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_button_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_button_test.xml @@ -258,31 +258,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_distance_sensor_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_distance_sensor_test.xml index a65a8775ca..2957fa4328 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_distance_sensor_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_distance_sensor_test.xml @@ -173,31 +173,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_gestures_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_gestures_test.xml index 332cab9537..8657725add 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_gestures_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_gestures_test.xml @@ -345,31 +345,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_infrared_obstacle_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_infrared_obstacle_test.xml index d2a42344da..383bf7506e 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_infrared_obstacle_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_infrared_obstacle_test.xml @@ -314,31 +314,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_line_follower_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_line_follower_test.xml index 77028e6a91..6f3a8c8d9a 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_line_follower_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_line_follower_test.xml @@ -579,31 +579,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_remaining_sensors_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_remaining_sensors_test.xml index 01a95b268d..c9ccf5a130 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_remaining_sensors_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_remaining_sensors_test.xml @@ -382,31 +382,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_timer_test.xml b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_timer_test.xml index dfb8e35933..7628399b83 100644 --- a/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_timer_test.xml +++ b/OpenRobertaServer/src/test/resources/crossCompilerTests/robotSpecific/joycar/sensor_timer_test.xml @@ -137,31 +137,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R diff --git a/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/JoyCarPythonVisitor.java b/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/JoyCarPythonVisitor.java index 1d9e4778b1..d29f7cc8d4 100644 --- a/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/JoyCarPythonVisitor.java +++ b/RobotMbed/src/main/java/de/fhg/iais/roberta/visitor/codegen/JoyCarPythonVisitor.java @@ -307,7 +307,7 @@ private void i2cCodeGeneration(ExternalSensor sensorBlock) { ConfigurationComponent bus = getI2CBusWithSensor(sensorName); ConfigurationComponent sensor = getBusSubComponent(bus, sensorName); - String port = sensor.getProperty("PORT"); + String port = sensor.getProperty("BRICK_PORT"); // Please do not change the order, it is the bit position of the sensor port String[] portMap = {"SPEED_L", "SPEED_R", "LINE_TRK_L", "LINE_TRK_M", "LINE_TRK_R", "OBSTCL_L", "OBSTCL_R"}; port = Integer.toString(ArrayUtils.indexOf(portMap, port)); diff --git a/RobotMbed/src/main/resources/joyCar/configuration.default.xml b/RobotMbed/src/main/resources/joyCar/configuration.default.xml index a912069544..ceb657fec0 100644 --- a/RobotMbed/src/main/resources/joyCar/configuration.default.xml +++ b/RobotMbed/src/main/resources/joyCar/configuration.default.xml @@ -79,31 +79,31 @@ EL - SPEED_L + SPEED_L ER - SPEED_R + SPEED_R OL - OBSTCL_L + OBSTCL_L OR - OBSTCL_R + OBSTCL_R LL - LINE_TRK_L + LINE_TRK_L LM - LINE_TRK_M + LINE_TRK_M LR - LINE_TRK_R + LINE_TRK_R