Add Home Assistant screen manager and runtime tile configuration

This commit is contained in:
Max Gramser
2026-09-12 12:09:58 +02:00
parent 427e4049ab
commit d271a63241
43 changed files with 13991 additions and 388 deletions
+14
View File
@@ -0,0 +1,14 @@
#include "../components/smart_display/calibration_math.h"
#include <cassert>
int main() {
using namespace screen_calibration;
Calibration c;
std::array<Point,5> raw;
for (int i=0;i<5;++i) raw[i] = {280+TARGETS[i].y*3580/240,340+TARGETS[i].x*3520/320};
assert(fit(raw,c));
for(int i=0;i<5;++i) { auto p=project(c,raw[i]); assert(std::hypot(p.x-TARGETS[i].x,p.y-TARGETS[i].y)<0.01); }
raw[4].x+=600; assert(!fit(raw,c)); // independent center check
for (auto &r:raw) r={1000,1000}; assert(!fit(raw,c));
for (int i=0;i<5;++i) raw[i] = {280+TARGETS[i].y*3580/240+TARGETS[i].x*0.2,340+TARGETS[i].x*3520/320};
assert(fit(raw,c)); // skew correction
}