死代码清理+越界修复+构建去重: 注释PIDController/删除TimerVideo, floodFill半径10→5, ctl.sh删GPIO66/75, CMake双重互斥合并

This commit is contained in:
spdis
2026-06-13 13:30:39 +08:00
parent 7315a74773
commit d1e2234a43
8 changed files with 5 additions and 136 deletions
-28
View File
@@ -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
View File
@@ -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