初始提交:龙芯2K0300智能车卖家Demo完整代码

This commit is contained in:
spdis
2026-05-28 15:24:33 +08:00
commit b6b631cef3
80 changed files with 7153 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# demo1
add_executable(encoder_demo encoder_demo.cpp)
# 链接 OpenCV 库
target_link_libraries(encoder_demo common_lib ${OpenCV_LIBS})
+22
View File
@@ -0,0 +1,22 @@
/*
* @Author: ilikara 3435193369@qq.com
* @Date: 2024-11-30 09:06:41
* @LastEditors: ilikara 3435193369@qq.com
* @LastEditTime: 2025-01-08 07:09:44
* @FilePath: /smartcar/encoder_demo/encoder_demo.cpp
* @Description: 编码器测试用
*
* Copyright (c) 2024 by ilikara 3435193369@qq.com, All Rights Reserved.
*/
#include "encoder.h"
#include <iostream>
int main()
{
ENCODER encoder(0, 73);
while (1)
{
std::cout << encoder.pulse_counter_update() << std::endl;
usleep(5000);
}
return 0;
}