Skip to content

Commit

Permalink
adding comment and correcting ext. board numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Camlane committed Aug 11, 2025
1 parent 44805e0 commit 0650030
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# All these should be set in the GitHub Repository actions and secrets at https://github.com/NTNU-SmallSat-Lab/outreach-website/settings/variables/actions
# Any changes done here will not be reflected in the production environment
# All variables named toBeGenerated should be generated with the command `openssl rand -base64 32`
# All variables named toGetFromServer are available at the path /root/website_secrets/secrets on the smallsat02 server
HOST=0.0.0.0
PORT=1337
STRAPI_URL="https://hypso.space/strapi/"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/grafana/controllers/grafana.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = {
} else if (i === 11) {
name = "BP 4";
} else if (i >= 12 && i <= 13) {
name = `Ext. Board ${i - 10}`;
name = `Ext. Board ${i - 11}`;
}
}
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export default function SatTelemetry({
batteryVoltageData[1][index] / 1000,
],
);

{
/* Battery Current Data */
}

const batteryCurrentData = [data?.battCurrIn, data?.battCurrOut].filter(
(curr) => curr,
); // Filter out any undefined values
Expand All @@ -114,7 +114,6 @@ export default function SatTelemetry({
{
/* Temperature Panel Data */
}

const checkLine = (data: number[]) => {
return data.every((index) => data[index] === data[0]);
};
Expand All @@ -127,12 +126,13 @@ export default function SatTelemetry({

for (let i = 0; i <= 13; i++) {
if (satName === "HYPSO-1" && (i === 12 || i === 13)) continue;
// HYPSO-1 has no Ext. Board
if (satName === "HYPSO-2" && i === 10) continue;
// Skip panel 10 for HYPSO-2

const tempData = data?.[`tempPanelData${i}`];
console.log(`tempPanelData${i}`, checkLine(tempData?.array[1]));
// Check if tempData is defined and has
// Check if tempData is defined and has no uncoherent data
if (tempData && !checkLine(tempData.array[1])) {
tempPanelChart.push({
name: tempData.name || `Panel ${i}`,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/satellites/[satelliteSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default async function SatelliteInfoPage({
) : null
) : null}
</div>

{/* Related projects */}
<div className="mt-8 flex w-full flex-col items-center">
{relatedProjects?.length != 0 ? (
Expand Down

0 comments on commit 0650030

Please sign in to comment.