Initial commit: SmartCar Framework v0.1 — 龙芯2K0300智能车开发框架\n\n- HAL: GPIO/PWM/Encoder/Framebuffer 驱动\n- Control: PID/IMU/Motor/Servo 控制\n- Vision: HSV双Otsu→4点标定IPM→洪泛填充→逐行搜线\n- Strategy: 三区前瞻偏差+速度策略\n- Debug: 文件热调参+LCD预览+cv截帧\n- Scheduler: 5ms timerfd+epoll 中央调度器

This commit is contained in:
2026-05-25 10:31:55 +08:00
commit 28d9c6da58
52 changed files with 2599 additions and 0 deletions

17
debug/draw.hpp Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <cstdint>
#include "types.hpp"
struct DebugOverlay {
bool enable = true;
int mode = DBG_OVERLAY;
};
extern DebugOverlay g_dbg;
void dbg_draw_init(uint16* fb_buffer, int w, int h);
void dbg_draw_line(int x0, int y0, int x1, int y1, uint8 r, uint8 g, uint8 b);
void dbg_draw_cross(int cx, int cy, int size, uint8 r, uint8 g, uint8 b);
void dbg_draw_rect(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b);
void dbg_draw_points(const int points[][2], int count, uint8 r, uint8 g, uint8 b);
void dbg_draw_edge_zoom(const EdgeLines& lines, uint8 r, uint8 g, uint8 b);