Skip to content

Commit 02a8091

Browse files
authored
Merge pull request #3333 from JdeRobot/fix-new-themes
Fix new themes
2 parents 9a309bd + 5515b9a commit 02a8091

File tree

11 files changed

+32
-20
lines changed

11 files changed

+32
-20
lines changed

common/hal_interfaces/hal_interfaces/general/lidar.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ def pointCloud2LidarData(cloud):
4646
lidar.intensities = [i[0] for i in intensities]
4747

4848
# Timestamp (ROS 2 Time -> seconds)
49-
lidar.timeStamp = (
50-
cloud.header.stamp.sec + (cloud.header.stamp.nanosec * 1e-9)
51-
)
49+
lidar.timeStamp = cloud.header.stamp.sec + (cloud.header.stamp.nanosec * 1e-9)
5250

5351
# Validate point cloud
5452
lidar.is_dense = all(

exercises/static/exercises/autoparking/python_template/ros2_humble/WebGUI.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import json
22

3-
from gui_interfaces.general.measuring_threading_gui_harmonic import MeasuringThreadingGUI
3+
from gui_interfaces.general.measuring_threading_gui_harmonic import (
4+
MeasuringThreadingGUI,
5+
)
46
from console_interfaces.general.console import start_console
57
from map import Map
68
from HAL import getFrontLaserData, getRightLaserData, getBackLaserData

exercises/static/exercises/autoparking_lidar/python_template/ros2_humble/WebGUI.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import json
22
import math
33

4-
from gui_interfaces.general.measuring_threading_gui_harmonic import MeasuringThreadingGUI
4+
from gui_interfaces.general.measuring_threading_gui_harmonic import (
5+
MeasuringThreadingGUI,
6+
)
57
from console_interfaces.general.console import start_console
68
from HAL import getLidarData
79

@@ -35,7 +37,9 @@ def update_gui(self):
3537
is_valid = False
3638
if is_valid:
3739
x, y, z = lidar.points[i]
38-
points.append((float(x*10), float((z + 1.75)*10), float(-y*10)) + color)
40+
points.append(
41+
(float(x * 10), float((z + 1.75) * 10), float(-y * 10)) + color
42+
)
3943
self.payload["lidar"] = json.dumps(points)
4044
message = json.dumps(self.payload)
4145
self.send_to_client(message)

react_frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"axios": "^1.12.0",
6060
"glob": "^8.0.3",
6161
"jderobot-commsmanager": "1.0.16",
62-
"jderobot-ide-interface": "0.2.64",
62+
"jderobot-ide-interface": "0.2.68",
6363
"jszip": "^3.10.1",
6464
"styled-components": "^5.3.6"
6565
},

react_frontend/src/components/buttons/Language.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const LanguageButton = ({
1515
}) => {
1616
const theme = useAcademyTheme();
1717

18-
console.log(loading)
18+
console.log(loading);
1919

2020
const switchLanguage = () => {
2121
setter(language === "python" ? "cpp" : "python");

react_frontend/src/components/buttons/PlayPause.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ const PlayPauseButton = ({
6969
}, [exerciseContext]);
7070

7171
useEffect(() => {
72-
if (state === states.RUNNING || state === states.PAUSED || state === states.TOOLS_READY) {
72+
if (
73+
state === states.RUNNING ||
74+
state === states.PAUSED ||
75+
state === states.TOOLS_READY
76+
) {
7377
setLoading(false);
7478
}
7579
}, [state]);

react_frontend/src/components/exercise/WebGUI3D.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const WebGUI3D = ({
5050
];
5151
new_points.push({ pose, color });
5252
}
53-
53+
5454
if (refreshPoints) {
5555
addPoints(new_points);
5656
} else {

react_frontend/src/components/layouts/AcademyContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const AcademyContainer = () => {
3131

3232
if (loading) {
3333
return (
34-
<StyledAcademyContainer bgColor={theme.palette.background}>
34+
<StyledAcademyContainer bgColor={theme.palette.bg}>
3535
<StyledAcademyLoadingMsg>Loading exercises</StyledAcademyLoadingMsg>
3636
</StyledAcademyContainer>
3737
);
@@ -54,7 +54,7 @@ const AcademyContainer = () => {
5454
}) || [];
5555

5656
return (
57-
<StyledAcademyContainer bgColor={theme.palette.background}>
57+
<StyledAcademyContainer bgColor={theme.palette.bg}>
5858
<StyledExerciseList>
5959
{filteredData.map((exercise) => (
6060
<ExerciseCard

react_frontend/src/components/layouts/ExerciseContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const ExerciseContainer = ({
223223
});
224224

225225
useEffect(() => {
226-
saveFile(true)
226+
saveFile(true);
227227
if (language === "cpp") {
228228
setBaseFile(base_file_cpp);
229229
} else {
@@ -235,7 +235,7 @@ const ExerciseContainer = ({
235235
file: {
236236
get: (project: string, file: Entry) => {
237237
const func = async (file: Entry) => {
238-
saveFile(false)
238+
saveFile(false);
239239
if (file.name === "academy.cpp") {
240240
return defaultCppCode;
241241
} else {

react_frontend/src/contexts/AcademyThemeContext.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const darkTheme: AcademyTheme = {
2121
success: "#29ac29",
2222
warning: "#b87a09",
2323
error: "#b91c1cff",
24-
background: "#16161d",
24+
bgDark: "#16161d",
25+
bg: "#16161d",
26+
bgLight: "#16161d",
2527
primary: "#ffa726",
2628
secondary: "#ff8800",
2729
scrollbar: "#6f6f90",
@@ -64,7 +66,9 @@ const lightTheme: AcademyTheme = {
6466
success: "#29ac29",
6567
warning: "#af5500ff",
6668
error: "#802626",
67-
background: "#ffffff",
69+
bgDark: "#ffffff",
70+
bg: "#ffffff",
71+
bgLight: "#ffffff",
6872
primary: "#ffa726",
6973
secondary: "#ff8800",
7074
scrollbar: "#6f6f90",

0 commit comments

Comments
 (0)