Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
chdk_pipe.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 OpenUAS
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/**
19 * @file chdk_pipe.h
20 * @brief Bounded CHDKbridge subprocess lifecycle for USHER's visible-camera backend.
21 * @details Each invocation owns one PTP session. No host Lua or shell is used.
22 */
23
24#include <signal.h>
25#include <stdint.h>
26
27#define CHDK_CONTROL_REPLY_SIZE 4U
28#define CHDK_CONTROL_REPLY_TAG 0xc1U
29
30/** @brief Prepare bounded controller ownership without accessing USB.
31 * @return 0 when the executable is accessible and shutdown is not requested.
32 * @details Settings and camera readiness are checked in the capture invocation. */
33int chdk_pipe_init(void);
34
35void chdk_pipe_set_running(const volatile sig_atomic_t *running);
36
37/** @brief Capture directly to a new JPEG destination without overwriting a file.
38 * @param filename Caller-owned destination path.
39 * @return 0 for a checked saved JPEG, otherwise -1; capture is never replayed. */
40int chdk_pipe_shoot(const char *filename);
41uint8_t chdk_pipe_control(uint8_t command, uint8_t value, uint8_t *observed, uint8_t *evidence);
42
43/** @brief Terminate and reap the owned process group using bounded grace periods. */
44void chdk_pipe_deinit(void);
45
uint8_t chdk_pipe_control(uint8_t command, uint8_t value, uint8_t *observed, uint8_t *evidence)
Apply one supported lens command and qualify device evidence.
Definition chdk_pipe.c:477
void chdk_pipe_set_running(const volatile sig_atomic_t *running)
Configure cancellation for controller operations.
Definition chdk_pipe.c:167
int chdk_pipe_init(void)
Prepare bounded controller ownership without accessing USB.
Definition chdk_pipe.c:386
int chdk_pipe_shoot(const char *filename)
Capture directly to a new JPEG destination without overwriting a file.
Definition chdk_pipe.c:440
void chdk_pipe_deinit(void)
Terminate and reap the owned process group using bounded grace periods.
Definition chdk_pipe.c:239
static const volatile sig_atomic_t * running
char evidence[8192]
Definition lwir_image.c:66