v1.4实现机器人一起踢乒乓球功能,使用maixcam,离线运行。

This commit is contained in:
myperworld committed 2026-01-02 08:24:04 +08:00
1 parent 9d3aa2684b
commit ce8dc19088
1854 files changed
+14918 -23

No files matched your search

@@ -0,0 +1,27 @@
// g++ --std=c++11 test.cpp
#include "test.h"
#include "test.h"
#include "fx/frame.h"
#include "fx/video/frame_tracker.h"
#include "fl/namespace.h"
#include "fl/namespace.h"
FASTLED_USING_NAMESPACE
TEST_CASE("FrameTracker basic frame advancement") {
FrameTracker tracker(1.0f); // 1fps == 1000ms per frame
uint32_t currentFrame, nextFrame;
uint8_t amountOfNextFrame;
//tracker.reset(1000); // start at time 1000ms
// Shift the time to 500 ms or 50% of the first frame
tracker.get_interval_frames(500, &currentFrame, &nextFrame, &amountOfNextFrame);
CHECK(currentFrame == 0);
CHECK(nextFrame == 1);
CHECK(amountOfNextFrame == 127);
}