Skip to content

Commit

Permalink
Added sensorboxes and pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
vrushang1234 committed Jun 1, 2024
1 parent f6bebc1 commit 4ece8a6
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 4 deletions.
2 changes: 1 addition & 1 deletion control-station/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import usePodData from "./services/usePodData";
import PodContext from "./services/PodContext";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { Dashboard } from "@/views";
import Dynamics from "./components/Dynamics/Dynamics";
import Dynamics from "./views/Dynamics/Dynamics";

function App() {
const { podData, podSocketClient } = usePodData();
Expand Down
3 changes: 0 additions & 3 deletions control-station/src/components/Dynamics/Dynamics.tsx

This file was deleted.

Binary file added control-station/src/data/images/FrontPod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added control-station/src/data/images/SidePod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions control-station/src/views/Dynamics/Dynamics.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.dynamics {
display: flex;
}

.dynamics-sensorbox {
width: 40%;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
}

.dynamics-pictures {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}

.pod-picture-container {
background-color: rgb(209, 209, 209);
width: 60%;
height: 40%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 40px;
}
28 changes: 28 additions & 0 deletions control-station/src/views/Dynamics/Dynamics.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import SensorBox from "@/components/SensorBoxes/Sensors/SensorBox";
import PodContext from "@/services/PodContext";
import FrontPod from "@/data/images/FrontPod.png";
import SidePod from "@/data/images/SidePod.png";
import "./Dynamics.css";
import { useContext } from "react";
function Dynamics() {
const { podData } = useContext(PodContext);
const { gyroscope } = podData;
return (
<div className="dynamics">
<div className="dynamics-sensorbox">
<SensorBox title="Roll" value={gyroscope.roll} />
<SensorBox title="Pitch" value={gyroscope.pitch} />
</div>
<div className="dynamics-pictures">
<div className="pod-picture-container">
<img src={FrontPod} />
</div>
<div className="pod-picture-container">
<img src={SidePod} />
</div>
</div>
</div>
);
}

export default Dynamics;

0 comments on commit 4ece8a6

Please sign in to comment.