死代码清理+越界修复+构建去重: 注释PIDController/删除TimerVideo, floodFill半径10→5, ctl.sh删GPIO66/75, CMake双重互斥合并
This commit is contained in:
-28
@@ -1,28 +0,0 @@
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(int interval_ms, std::function<void()> task);
|
||||
~Timer();
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
private:
|
||||
void run();
|
||||
|
||||
int interval; // Interval in milliseconds
|
||||
std::function<void()> task;
|
||||
std::atomic<bool> running;
|
||||
std::thread worker;
|
||||
};
|
||||
|
||||
#endif // TIMER_H
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
#ifndef VIDEO_H_
|
||||
#define VIDEO_H_
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
#include "Timer.h"
|
||||
#include "frame_buffer.h"
|
||||
|
||||
class Video
|
||||
{
|
||||
public:
|
||||
Video(const std::string &filename, double fps);
|
||||
~Video(void);
|
||||
|
||||
Timer timer;
|
||||
cv::Mat frame;
|
||||
std::mutex frameMutex;
|
||||
private:
|
||||
cv::VideoCapture cap;
|
||||
cv::Mat fbImage;
|
||||
cv::Mat resizedFrame;
|
||||
void streamCapture(void);
|
||||
int screenHeight, screenWidth;
|
||||
int newWidth, newHeight;
|
||||
int fb;
|
||||
uint16_t *fb_buffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user