From d4233d7a8d8a87b2508981bacc9d662891b9bc0b Mon Sep 17 00:00:00 2001 From: Mike Langmayr <1809691+mikelangmayr@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:39:25 -0700 Subject: [PATCH 1/2] Correct the build and run instructions in the README --- README.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c5d7342..ab2ae07 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,17 @@ If you encounter any problems or have questions about this project, please open $ rm -Rf * ``` -3. **Create the Makefile by running CMake** (from the build directory): +3. **Create the Makefile by running CMake** (from the build directory). `-DCONTROLLER=` is required; CMake stops with an error if it is missing: - | Archon | ARC | - |------------------------|----------------------------------| - | `$ cmake ..` | `$ cmake -DINTERFACE_TYPE=AstroCam ..` | + | Archon | ARC | + |-----------------------------------|--------------------------------------| + | `$ cmake -DCONTROLLER=archon ..` | `$ cmake -DCONTROLLER=astrocam ..` | + + Add `-DINSTRUMENT=` to build an instrument module, whose sources come from `camerad/Instruments/`: + + ```bash + $ cmake -DCONTROLLER=archon -DINSTRUMENT=hispec_tracking_camera .. + ``` To enable the shared-memory output (`SHM_ENABLED` in a `.cfg` file, see [Frame Outputs](#frame-outputs) below), add `-DENABLE_SHM_OUTPUT=ON -DImageStreamIO_DIR=/lib/cmake`: @@ -74,31 +80,36 @@ If you encounter any problems or have questions about this project, please open 5. **Run the Camera Server:** - - **As a foreground process:** + The configuration file is passed with `--config` and is required. + + - **As a foreground process**, logging to the console as well as to `LOGPATH`: ```bash - $ ../bin/camerad --foreground + $ ../bin/camerad --foreground --config ``` - - **As a daemon:** + - **As a daemon**, which is the default without `--foreground`: ```bash - $ ../bin/camerad -d + $ ../bin/camerad --config ``` *Replace `` with an appropriate configuration file. See the example `.cfg` files in the `config` directory (per-instrument deployment configs live in each instrument's own repo under its `config/` directory; `config/demo` here is a generic example).* + Logging always goes to a daily file under `LOGPATH`. Whether it is also written to stderr follows `--foreground`, so an operator watching a console sees it and a daemon does not duplicate its whole log into the stderr redirect. `LOG_STDERR` in the `.cfg` overrides that either way. + 6. **(Optional) Run the Archon Emulator:** ```bash - $ ../bin/emulator + $ ../bin/emulator -i ``` - *Note: The emulator software will only be compiled when `INTERFACE_TYPE` is set to Archon (default).* + The emulator reads `EMULATOR_PORT` and `EMULATOR_SYSTEM` from the same `.cfg` the server uses, so point `ARCHON_IP`/`ARCHON_PORT` at it to run without hardware. `-i generic` suits the shipped test configs. It is built only for `-DCONTROLLER=archon`. -7. **(Optional) Run Unit Tests:** +7. **(Optional) Run Unit Tests.** The tests are excluded from the default target, so build them first: ```bash + $ make run_unit_tests $ ../bin/run_unit_tests ``` From 1ab756a3784396e37a04141c0f4fc440552653a1 Mon Sep 17 00:00:00 2001 From: Mike Langmayr <1809691+mikelangmayr@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:50:47 -0700 Subject: [PATCH 2/2] Note that pybind11 is only needed to build the module --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ab2ae07..077484c 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ If you encounter any problems or have questions about this project, please open pybind11 is located by asking the interpreter CMake selected, so pass `-DPython3_EXECUTABLE=...` to build against a specific one (a virtualenv, say). The module and that interpreter then always agree on the ABI. + pybind11 is header-only and needed only to compile: the built module links cfitsio, CCfits and OpenCV but not pybind11, so it does not have to be present where the module is imported. + 4. **Compile the sources:** ```bash