项目结构大变

This commit is contained in:
2025-11-20 19:29:00 +08:00
parent 6a7ab65597
commit a8791ab3df
17 changed files with 549 additions and 287 deletions

View File

@@ -3,17 +3,11 @@
#include <string>
// Placeholder for TTL communication class
// In a real implementation, you would use a C++ serial library like:
// - serial (https://github.com/wjwwood/serial)
// - Boost.Asio
// - or a system-specific approach
class TTLCommunicator {
public:
TTLCommunicator(int baudrate = 115200);
TTLCommunicator(const std::string& port_name = "/dev/ttyUSB0", int baudrate = 115200);
~TTLCommunicator();
bool connect();
void close();
bool send_data(const std::string& data);
@@ -23,8 +17,9 @@ private:
std::string port_name;
int baudrate;
bool connected;
// These would be implemented with actual serial communication code
int serial_fd;
bool open_serial_port();
void close_serial_port();
};