minipix_uart_interface
A library and examples for the MiniPIX UART interface
|
Go to the documentation of this file.
4 #define LLCP_DEBUG_PRINT 0
5 #define SERIAL_BUFFER_SIZE 2048
6 #define MUI_USER_HANDSHAKES 0
15 #include <llcp_minipix_messages.h>
18 #include <opencv2/opencv.hpp>
19 #include <opencv2/core/core.hpp>
20 #include <opencv2/imgproc/imgproc.hpp>
21 #include <opencv2/highgui/highgui.hpp>
22 #include <opencv2/imgproc.hpp>
41 Gatherer(
const std::string data_path);
43 void connect(
const std::string& serial_port,
const int& baud_rate,
const bool& virtual_port);
51 void measureFrame(
const uint16_t& acquisition_time_ms,
const uint8_t& mode);
52 void pwr(
const bool& state);
53 void maskPixel(
const uint8_t& x,
const uint8_t& y,
const bool state);
54 void setThreshold(
const uint16_t& coarse,
const uint16_t& fine);
68 std::mutex mutex_serial_port_;
73 std::thread thread_main_;
74 void threadMain(
void);
76 std::atomic<bool> initialized_ =
false;
77 std::atomic<bool> running_ =
true;
86 void callbackFrameMeasurementFinished(
const LLCP_Message_t* message_in);
92 void bin2hex(
const uint8_t x, uint8_t* buffer);
96 FILE* measured_data_file_;
101 std::thread thread_plot_;
102 void threadPlot(
void);
105 cv::Mat frame_top_left;
106 cv::Mat frame_top_right;
107 cv::Mat frame_bot_left;
108 cv::Mat frame_bot_right;
110 std::mutex mutex_cv_frames_;
void connect(const std::string &serial_port, const int &baud_rate, const bool &virtual_port)
Definition: gatherer.cpp:48
Definition: gatherer.h:38
bool measuring_frame_
Definition: gatherer.h:61
void pwr(const bool &state)
Definition: gatherer.cpp:747
LLCP_Message_t
Definition: llcp.h:129
bool waiting_for_tmp_
Definition: gatherer.h:63
void setConfigurationPreset(const uint16_t &preset)
Definition: gatherer.cpp:843
void maskPixel(const uint8_t &x, const uint8_t &y, const bool state)
Definition: gatherer.cpp:778
bool waiting_for_status_
Definition: gatherer.h:64
void getStatus(void)
Definition: gatherer.cpp:657
Definition: serial_port.h:16
#define SERIAL_BUFFER_SIZE
Definition: gatherer.h:5
void getFrameData(void)
Definition: gatherer.cpp:611
LLCP_FrameDataMsg_t
Definition: llcp_minipix_messages.h:213
void charCallback(const char in)
void stop(void)
Definition: gatherer.cpp:59
void setThreshold(const uint16_t &coarse, const uint16_t &fine)
Definition: gatherer.cpp:811
bool waiting_for_ack_
Definition: gatherer.h:62
Gatherer(const std::string data_path)
Definition: gatherer.cpp:5
void measureFrame(const uint16_t &acquisition_time_ms, const uint8_t &mode)
Definition: gatherer.cpp:713
void sendAck(bool ack)
Definition: gatherer.cpp:633
LLCP_Receiver_t
Definition: llcp.h:107
void getTemperature(void)
Definition: gatherer.cpp:685