v1.2版本改为通过xbox系列手柄进行遥控,并增加智能模式和手动模式

This commit is contained in:
myperworld committed 2025-10-10 21:58:44 +08:00
1 parent 76603d3c31
commit 1a97bc32c3
1839 files changed
+478852 -3

No files matched your search

@@ -0,0 +1,32 @@
// g++ --std=c++11 test.cpp
#include "test.h"
#include "FastLED.h"
#include "fl/raster.h"
#include "fl/tile2x2.h"
#include "fl/xypath.h"
#include "fl/namespace.h"
using namespace fl;
TEST_CASE("XYRasterU8SparseTest should match bounds of pixels draw area") {
XYPathPtr path = XYPath::NewLinePath(-1, -1, 1, 1);
path->setDrawBounds(4,4);
Tile2x2_u8 sp0 = path->at_subpixel(0);
Tile2x2_u8 sp1 = path->at_subpixel(1);
Tile2x2_u8 subpixels[2] = {sp0, sp1};
MESSAGE("subpixels[0] = " << subpixels[0]);
MESSAGE("subpixels[1] = " << subpixels[1]);
XYRasterU8Sparse raster(4, 4);
raster.rasterize(subpixels);
auto obligatory_bounds = raster.bounds();
REQUIRE_EQ(rect<uint16_t>(0, 0, 4, 4), obligatory_bounds);
auto pixel_bounds = raster.bounds_pixels();
REQUIRE_EQ(rect<uint16_t>(0, 0, 4, 4), pixel_bounds);
}