Skip to content

Commit

Permalink
Merge pull request #2742 from JdeRobot/changing-frequencies-widget
Browse files Browse the repository at this point in the history
Update freq widget
  • Loading branch information
javizqh authored Sep 24, 2024
2 parents fe51408 + f7b7cce commit 26a3060
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions react_frontend/src/components/visualizers/Frequencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const Frequencies = (props) => {
React.useEffect(() => {
const callback = (message) => {
if (message.data.ros_version.trim() === "noetic") {
setRosVersion("ROS Noetic");
setRosVersion(["ROS", "Noetic"]);
} else if (message.data.ros_version.trim() === "humble") {
setRosVersion("ROS2 Humble");
setRosVersion(["ROS2", "Humble"]);
}
setGpuAvaliable(message.data.gpu_avaliable);
};
Expand All @@ -44,11 +44,17 @@ export const Frequencies = (props) => {

return (
<div className={props.style}>
<Typography title="BRAIN">{frequencies.brain.toFixed(0)}</Typography>
<Typography title="AF">{frequencies.brain.toFixed(0)}</Typography>
<Typography>Hz</Typography>
<Typography>/</Typography>
<Typography title="RTF">{frequencies.rtf}</Typography>
{rosVersion &&
<>
<Typography>/</Typography>
<Typography>{rosVersion}</Typography>
<Typography>{rosVersion[0]}</Typography>
<Typography>{rosVersion[1]}</Typography>
</>
}
<Typography>/</Typography>
<Typography>GPU</Typography>
<Typography>{gpuAvaliable ? "ON" : "OFF"}</Typography>
Expand Down

0 comments on commit 26a3060

Please sign in to comment.