px4-configuration 0.1.0__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,7 @@ app.add_middleware(
45
45
  active_shell_connections: dict[str, ShellConnection] = {}
46
46
 
47
47
 
48
- @app.get("/api/px4/health", response_model=Px4HealthResponse)
48
+ @app.get("/health", response_model=Px4HealthResponse)
49
49
  async def get_px4_health(
50
50
  port: Optional[str] = Query(None),
51
51
  baudrate: Optional[int] = Query(None),
@@ -57,7 +57,7 @@ async def get_px4_health(
57
57
 
58
58
  return await read_px4_health(port=port, baudrate=baudrate)
59
59
 
60
- @app.post("/api/calibration/start")
60
+ @app.post("/calibration/start")
61
61
  async def start_calibration(request: CalibrationRequest):
62
62
  port = request.port or settings.default_port
63
63
  baudrate = request.baudrate or settings.default_baudrate
@@ -79,7 +79,7 @@ async def start_calibration(request: CalibrationRequest):
79
79
  return EventSourceResponse(event_generator())
80
80
 
81
81
 
82
- @app.post("/api/params/upload")
82
+ @app.post("/params/upload")
83
83
  async def upload_params(
84
84
  file: UploadFile = File(...),
85
85
  port: Optional[str] = Query(None, description="Serial port (default: /dev/pixhawk)"),
@@ -115,7 +115,7 @@ async def upload_params(
115
115
  return EventSourceResponse(event_generator())
116
116
 
117
117
 
118
- @app.post("/api/sdcard/upload")
118
+ @app.post("/sdcard/upload")
119
119
  async def upload_sdcard_file(
120
120
  file: UploadFile = File(...),
121
121
  port: Optional[str] = Query(None, description="Serial port (default: /dev/pixhawk)"),
@@ -151,7 +151,7 @@ async def upload_sdcard_file(
151
151
  return EventSourceResponse(event_generator())
152
152
 
153
153
 
154
- @app.websocket("/api/shell/connect")
154
+ @app.websocket("/shell/connect")
155
155
  async def shell_websocket(
156
156
  websocket: WebSocket,
157
157
  port: Optional[str] = Query(None, description="Serial port (default: /dev/pixhawk)"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: px4-configuration
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Tools and REST API for configuring PX4 from a companion computer
5
5
  Author-email: Alex <bonnefond@fly4future.com>
6
6
  License: BSD-3-Clause
@@ -76,7 +76,7 @@ _All scripts use a serial connection to talk to PX4._
76
76
 
77
77
  ## REST API (FastAPI)
78
78
 
79
- The companion computer can expose the same functionality through a REST API located in `px4_configuration/api/`.
79
+ The companion computer can expose the same functionality through a REST API located in the `px4_configuration.api` package.
80
80
 
81
81
  ### Run the API server
82
82
 
@@ -93,20 +93,22 @@ uvicorn px4_configuration.api.main:app --host 0.0.0.0 --port 8000
93
93
 
94
94
  ### Endpoints
95
95
 
96
- - `GET /api/health` – health check
97
- - `POST /api/calibration/start` – start selected calibrations, returns Server-Sent Events (SSE) with progress
98
- - `POST /api/params/upload` – upload a `.params` file (multipart form), SSE progress stream
99
- - `POST /api/sdcard/upload` – upload a file (e.g. `extras.txt`) to the SD card, SSE progress stream
100
- - `WS /api/shell/connect` – interactive PX4 shell over WebSocket
96
+ - `GET /health` – health check
97
+ - `POST /calibration/start` – start selected calibrations, returns Server-Sent Events (SSE) with progress
98
+ - `POST /params/upload` – upload a `.params` file (multipart form), SSE progress stream
99
+ - `POST /sdcard/upload` – upload a file (e.g. `extras.txt`) to the SD card, SSE progress stream
100
+ - `WS /shell/connect` – interactive PX4 shell over WebSocket
101
101
 
102
102
  All endpoints accept optional `port` and `baudrate` (defaults `/dev/pixhawk`, `2000000`). SSE responses emit JSON payloads with keys such as `type`, `message`, `progress`, etc.
103
103
 
104
104
  ### Calibration Message Structure
105
105
 
106
- The `/api/calibration/start` endpoint returns structured JSON messages via Server-Sent Events (SSE). Each calibration type has a specific message format:
106
+ The `/calibration/start` endpoint returns structured JSON messages via Server-Sent Events (SSE). Each calibration type has a specific message format:
107
107
 
108
108
  #### Accelerometer Calibration
109
109
 
110
+ The `/calibration/start` endpoint returns structured JSON messages via Server-Sent Events (SSE). Each calibration type has a specific message format:
111
+
110
112
  ```json
111
113
  {
112
114
  "type": "accelerometer_progress",
@@ -1,7 +1,7 @@
1
1
  px4_configuration/__init__.py,sha256=U0jqmbB8mDtIQ_ZPVjfHzoF7b9EM1TFJQRWEJ49Vk1I,334
2
2
  px4_configuration/api/__init__.py,sha256=o0txTrY6RjO1ehOJGtMerrVMm0QR1E4PiutPhoKtmZo,137
3
3
  px4_configuration/api/config.py,sha256=imb6qv75ye_DE4t7kbf7xbxWPvy3Yota95keVjg1c5A,562
4
- px4_configuration/api/main.py,sha256=YkEJWPBBeXxzsHEp2CK3QNk0_yH1fHDfUkzCYbvWO6I,8347
4
+ px4_configuration/api/main.py,sha256=xiOOVfWQB6pRhzA2rDJzFDrfGTnqAyQeIcQ3Hlzplyk,8323
5
5
  px4_configuration/api/models.py,sha256=Wi0eWsfqd4noxSPgIN4yUnKGdoncBwkmlSvCs6HAsbE,3552
6
6
  px4_configuration/api/services/__init__.py,sha256=U91RCGMiGcIQqtbnzscfNbWpFw65ZNz0DKabCPtTGMw,163
7
7
  px4_configuration/api/services/calibration_service.py,sha256=yLlSd3ePe4zOrb4hdXdiwVRiZ5u1f-ACO1-eiyocFSU,4076
@@ -11,7 +11,7 @@ px4_configuration/api/services/sdcard_service.py,sha256=6bnMTcaHddo8ZOsrKtl39V51
11
11
  px4_configuration/api/services/shell_service.py,sha256=A_28vCxWyc6e-Usf3QLHqCy5Auf7tyGwqySQ5E5LO1s,2096
12
12
  px4_configuration/api/utils/__init__.py,sha256=KR-_U6nAXr8V1uxsB1hCFXPxKYYEwbf096kvhhUJfFk,54
13
13
  px4_configuration/api/utils/calibration_parser.py,sha256=ARn702mhz16gJV3gw0-HvFQmUSNCMbohwxTAtcs06GQ,9821
14
- px4_configuration-0.1.0.dist-info/METADATA,sha256=UwD5N14cWtJvxQqU7QgW56l3d05KwcV6lbPp0ZJkulM,6968
15
- px4_configuration-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- px4_configuration-0.1.0.dist-info/entry_points.txt,sha256=mBRa68p2qL9HPLE9nCruYZDtTmuDOhFIbkY_nwX-WTc,67
17
- px4_configuration-0.1.0.dist-info/RECORD,,
14
+ px4_configuration-0.2.0.dist-info/METADATA,sha256=MaxU3zpqE8nUdJgb892fbuMvrnqL1irMfyAs43fyYus,7106
15
+ px4_configuration-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ px4_configuration-0.2.0.dist-info/entry_points.txt,sha256=mBRa68p2qL9HPLE9nCruYZDtTmuDOhFIbkY_nwX-WTc,67
17
+ px4_configuration-0.2.0.dist-info/RECORD,,