Rename app and document virtual environment setup

This commit is contained in:
2026-08-25 22:18:31 +02:00
parent 2f6077f5d8
commit e845ae7eb6
5 changed files with 36 additions and 12 deletions
+20 -3
View File
@@ -1,4 +1,4 @@
# ArduSub Minimal Control # SUB Control
A deliberately small, low-bandwidth MAVLink controller for bench-testing an A deliberately small, low-bandwidth MAVLink controller for bench-testing an
ArduSub vehicle over a USB serial connection. It sends no parameter-list ArduSub vehicle over a USB serial connection. It sends no parameter-list
@@ -33,14 +33,31 @@ the frame mixing and generates the configured ESC outputs. For ArduSub,
## Run on Windows ## Run on Windows
1. Install Python 3.11 or newer. 1. Install Python 3.11 or newer. A virtual environment installs packages, but
2. Open PowerShell in this folder and run `./run.ps1`. it does not install Python itself.
2. Open PowerShell in this folder and run `./run.ps1` (or right-click it and
choose **Run with PowerShell**).
3. Select the autopilot's COM port, then click **Connect**. Baud and control-rate 3. Select the autopilot's COM port, then click **Connect**. Baud and control-rate
settings are under the small `•••` link button (normally 57600 baud / 20 Hz). settings are under the small `•••` link button (normally 57600 baud / 20 Hz).
4. Confirm `ArduSub` and a live heartbeat are shown. 4. Confirm `ArduSub` and a live heartbeat are shown.
5. Click **Set MANUAL**, then **ARM** only when the bench is safe. 5. Click **Set MANUAL**, then **ARM** only when the bench is safe.
6. Move the controls. Once armed, no additional enable button is needed. 6. Move the controls. Once armed, no additional enable button is needed.
`run.ps1` automatically creates a private `.venv` on the first run, installs
the versions declared in `requirements.txt`, and starts SUB Control. Later runs
reuse the same environment and update missing dependencies when necessary.
The `.venv` directory is intentionally ignored by Git: virtual environments
contain machine-specific executables and can be recreated from
`requirements.txt`.
## Repository layout
The Gitea repository is named `argo`. `SUB Control` is a normal directory inside
that repository containing this application. A Gitea **Project** is a planning
board for issues and tasks; source code is not attached to a Project board.
Git tracks the folder automatically because its files are committed on the
repository's `main` branch.
Keyboard controls for SimpleROV-3: W/S forward/back, A/D yaw left/right, Keyboard controls for SimpleROV-3: W/S forward/back, A/D yaw left/right,
Q/E alternative yaw control, and R/F rise/dive. Q/E alternative yaw control, and R/F rise/dive.
Releasing movement keys eases their controls back to neutral. Releasing movement keys eases their controls back to neutral.
+2 -2
View File
@@ -569,7 +569,7 @@ class SpringScale(ctk.CTkSlider):
class App(tk.Tk): class App(tk.Tk):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.title("ArduSub Minimal Control") self.title("SUB Control")
self.geometry("1040x800") self.geometry("1040x800")
self.minsize(920, 720) self.minsize(920, 720)
self.events = queue.Queue() self.events = queue.Queue()
@@ -676,7 +676,7 @@ class App(tk.Tk):
workspace = ctk.CTkFrame(shell, fg_color="#fbfbf9", corner_radius=22) workspace = ctk.CTkFrame(shell, fg_color="#fbfbf9", corner_radius=22)
workspace.grid(row=0, column=1, sticky="nsew") workspace.grid(row=0, column=1, sticky="nsew")
ctk.CTkLabel(rail, text="SIMPLE ROV / 03", text_color="#f4f4f1", ctk.CTkLabel(rail, text="SUB CONTROL / 03", text_color="#f4f4f1",
font=ctk.CTkFont("Helvetica", 13, "bold")).pack( font=ctk.CTkFont("Helvetica", 13, "bold")).pack(
anchor="w", padx=24, pady=(24, 0)) anchor="w", padx=24, pady=(24, 0))
ctk.CTkLabel(rail, text="ArduSub vehicle", text_color="#8f9699", ctk.CTkLabel(rail, text="ArduSub vehicle", text_color="#8f9699",
+10 -3
View File
@@ -1,8 +1,15 @@
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath ".venv\Scripts\python.exe")) { $projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
py -m venv .venv Set-Location -LiteralPath $projectRoot
if (-not (Get-Command py -ErrorAction SilentlyContinue)) {
throw "Python 3.11 or newer is required. Install Python from python.org, then run this script again."
} }
& .venv\Scripts\python.exe -m pip install -r requirements.txt if (-not (Test-Path -LiteralPath ".venv\Scripts\python.exe")) {
& py -3 -m venv .venv
}
& .venv\Scripts\python.exe -m pip install --disable-pip-version-check -r requirements.txt
& .venv\Scripts\python.exe app.py & .venv\Scripts\python.exe app.py
+3 -3
View File
@@ -3,12 +3,12 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<title>Simple ROV Control</title> <title>SUB Control</title>
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css">
</head> </head>
<body> <body>
<header class="window-bar"> <header class="window-bar">
<div class="window-drag pywebview-drag-region"><span class="mini-mark">S</span><strong>Simple ROV Control</strong><i id="model-file-name">Built-in vehicle</i></div> <div class="window-drag pywebview-drag-region"><span class="mini-mark">S</span><strong>SUB Control</strong><i id="model-file-name">Built-in vehicle</i></div>
<div class="window-actions"> <div class="window-actions">
<button id="window-min" aria-label="Minimize">—</button> <button id="window-min" aria-label="Minimize">—</button>
<button id="window-max" aria-label="Maximize">□</button> <button id="window-max" aria-label="Maximize">□</button>
@@ -17,7 +17,7 @@
</header> </header>
<main class="app-shell"> <main class="app-shell">
<aside class="vehicle-rail"> <aside class="vehicle-rail">
<header class="brand"><span class="brand-mark">S</span><span>SIMPLE ROV</span><small>03</small></header> <header class="brand"><span class="brand-mark">S</span><span>SUB CONTROL</span><small>03</small></header>
<div class="eyebrow">LIVE VEHICLE</div> <div class="eyebrow">LIVE VEHICLE</div>
<div class="rov-stage" aria-label="Top view of three-thruster ROV"> <div class="rov-stage" aria-label="Top view of three-thruster ROV">
<div class="water-ring r1"></div><div class="water-ring r2"></div> <div class="water-ring r1"></div><div class="water-ring r2"></div>
+1 -1
View File
@@ -280,7 +280,7 @@ def main():
api = ControlApi() api = ControlApi()
ui_path = Path(__file__).resolve().parent / "web" / "index.html" ui_path = Path(__file__).resolve().parent / "web" / "index.html"
window = webview.create_window( window = webview.create_window(
"Simple ROV Control", url=str(ui_path), js_api=api, "SUB Control", url=str(ui_path), js_api=api,
width=1120, height=760, min_size=(900, 650), width=1120, height=760, min_size=(900, 650),
background_color="#111719", frameless=True, easy_drag=False, background_color="#111719", frameless=True, easy_drag=False,
shadow=True, shadow=True,