API Reference
Base URL
1 |
|
Routes
1. Main Page - Cart Control
GET /
- Description: Renders the main page for cart control.
- Request Method: GET
- Request Parameters: None
- Response:
- Renders the "index.html" template.
POST /
- Description: Handles cart control commands.
- Request Method: POST
- Request Parameters:
cartID
(integer): Cart identifier.distanceID
(integer): Distance parameter.angleID
(integer): Angle parameter.- Response:
- Sends a JSON message to control the specified cart.
- Renders the "index.html" template.
2. Broker Settings Page
GET /brokerSettings
- Description: Renders the page for configuring broker settings.
- Request Method: GET
- Request Parameters: None
- Response:
- Renders the "brokerSettings.html" template.
3. Camera Settings Page
GET /cameraSettings
- Description: Renders the page for configuring camera settings.
- Request Method: GET
- Request Parameters: None
- Response:
- Renders the "cameraSettings.html" template.
4. Update variables.json
POST /updateJson
- Description: Updates variables.json via a POST request.
- Request Method: POST
- Request Parameters:
- JSON data in the request body.
- Response:
- Success:
- Updates variables.json with the submitted data.
- Renders the "index.html" template.
- Error (500 Internal Server Error):
- Returns a JSON response with the error details.
5. Run Camera
GET /runCamera
- Description: Runs the camera.
- Request Method: GET
- Request Parameters: None
- Response:
- Calls the
main
function from the custom module. - Renders the "cameraSettings.html" template.