summaryrefslogtreecommitdiff
path: root/src/camera/veyeimx287m.h
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-11-14 21:05:12 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-11-14 21:05:12 +0100
commit5df63c0bc7e3d6f1850d04f5bafbae2dd6fa619e (patch)
tree7b98d59baec4aac62cab374e95795a2ce6b88d03 /src/camera/veyeimx287m.h
parent36ef6a75e3418d88227e84ab175c0057e860c151 (diff)
organize things a bit, populate ICamera
Diffstat (limited to 'src/camera/veyeimx287m.h')
-rw-r--r--src/camera/veyeimx287m.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/camera/veyeimx287m.h b/src/camera/veyeimx287m.h
index 7d7e2c6..d8c42ae 100644
--- a/src/camera/veyeimx287m.h
+++ b/src/camera/veyeimx287m.h
@@ -10,6 +10,12 @@
#include "icamera.h"
+namespace veye {
+namespace imx287m {
+class i2c;
+} // namespace imx287m
+} // namespace veye
+
class HttpServer;
class VeyeIMX287m : public ICamera
@@ -29,18 +35,26 @@ public:
public:
bool startStream() override;
+ bool dequeueImageBuffer(size_t &image);
+ bool getImage(Image &image);
+
bool init();
- bool setExposureTime(const std::chrono::microseconds us);
- bool setExposureTimeUs(int value) override;
- bool setGain(int value) override;
+ // parameters
+public:
+ bool set_autoExposure(const bool enable) override;
+ std::optional<bool> get_autoExposure() override;
- bool setLaserLevel(int value) override;
+ bool set_autoGain(const bool enable) override;
+ std::optional<bool> get_autoGain() override;
- bool setSomething(int value) override;
+ bool set_exposureTime(const std::chrono::microseconds us) override;
+ std::optional<const std::chrono::microseconds> get_exposureTime() override;
- bool dequeueImageBuffer(size_t &image);
- bool getImage(Image &image);
+ bool set_gain(const float value) override;
+ std::optional<float> get_gain() override;
+
+ bool setLaserLevel(int value) override;
public:
/*!
@@ -50,10 +64,11 @@ public:
uint32_t processedCounter{0};
private:
- bool setCamParam(unsigned int v4l2controlId, int value);
bool openCam();
bool selectCam(int camIdx = 0);
bool initCam();
+
+ bool initI2C();
bool initHttpServer();
void calcFrameLoop(std::stop_token stopToken);
@@ -95,5 +110,6 @@ private:
// std::jthread m_calcThreads[1];
std::jthread m_calcThreads[4];
+ std::shared_ptr<veye::imx287m::i2c> m_i2c;
std::shared_ptr<HttpServer> m_httpServer;
};