Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile --filter=testing-view --filter=ui --filter=core
run: pnpm install --frozen-lockfile --filter=testing-view --filter=flashing-view --filter=competition-view --filter=ui --filter=core

- name: Build frontend
run: pnpm build --filter="./frontend/**"
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Comment thread
l-castel marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ node_modules/
.env

# Global binaries
*.exe
*.exe

# electron modules
electron-app/python
electron-app/logger
8 changes: 8 additions & 0 deletions backend/pkg/adj/validator.go
Comment thread
l-castel marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package adj

import (
"os"
"os/exec"
"path"
"strings"
Expand Down Expand Up @@ -62,6 +63,13 @@ func Validate() {
// If none of the candidates are found, an empty string is returned,
// indicating that no Python interpreter is available.
func pythonCommand() string {
// Prefer bundled Python shipped with the Electron app
if bundled := os.Getenv("HYPERLOOP_PYTHON_PATH"); bundled != "" {
if _, err := os.Stat(bundled); err == nil {
return bundled
}
}

candidates := []string{"python3", "python", "py"}

for _, c := range candidates {
Expand Down
Binary file removed common-front/public/pod_simplified.glb
Binary file not shown.
Binary file removed control-station/public/pod_simplified.glb
Binary file not shown.
9 changes: 8 additions & 1 deletion control-station/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import { ReactComponent as Batteries } from 'assets/svg/battery-filled.svg'
import { SplashScreen, WsHandlerProvider, useLoadBackend } from 'common';
import { useEffect } from 'react';

const FlashIcon = () => (
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
</svg>
);

export const App = () => {
const isProduction = import.meta.env.PROD;
const loadBackend = useLoadBackend(isProduction);
Expand All @@ -29,7 +35,8 @@ export const App = () => {
{ path: '/vehicle', icon: <Wheel /> },
{ path: '/booster', icon: <Cabinet /> },
{ path: '/batteries', icon: <Batteries /> },
{ path: '/cameras', icon: <Cameras /> }
{ path: '/cameras', icon: <Cameras /> },
{ path: '/flash', icon: <FlashIcon /> }
]}
/>
<Outlet />
Expand Down
2 changes: 2 additions & 0 deletions control-station/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { mainPageRoute } from "pages/VehiclePage/MainPage/mainPageRoute";
import { camerasRoute } from "pages/CamerasPage/camerasRoute";
import { batteriesRoute } from "pages/VehiclePage/BatteriesPage/batteriesRoute";
import { boosterRoute } from "pages/VehiclePage/BoosterPage/boosterRoute";
import { flashRoute } from "pages/FlashPage/flashRoute";
import { ConfigProvider, GlobalTicker } from "common";

const router = createHashRouter([
Expand All @@ -21,6 +22,7 @@ const router = createHashRouter([
boosterRoute,
batteriesRoute,
camerasRoute,
flashRoute,
],
},
]);
Expand Down
22 changes: 22 additions & 0 deletions control-station/src/pages/FlashPage/FlashPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { useEffect } from 'react';

export const FlashPage = () => {
useEffect(() => {
if ((window as any).electronAPI?.switchView) {
(window as any).electronAPI.switchView('flashing-view');
}
}, []);

return (
<div style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
width: '100%',
color: 'var(--text-color)'
}}>
<p>Opening flashing view...</p>
</div>
);
};
6 changes: 6 additions & 0 deletions control-station/src/pages/FlashPage/flashRoute.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { FlashPage } from "./FlashPage";

export const flashRoute = {
path: "/flash",
element: <FlashPage/>
};
Loading
Loading