The zone loader now ignores the Units DB field and detects the coordinate format by checking for decimal points: decimal values are percentages, integer-only values are legacy pixels. This fixes motion detection being broken when zones had Units=Pixels but percentage coordinates (or vice versa), which resulted in a ~99x99 pixel zone on a 2560x1440 monitor. The PHP zone view now always forces Units=Percent when saving, since it always works in percentage space. convertPixelPointsToPercent() now returns bool to indicate whether conversion occurred. Tests added for: truncation bug via atoi, correct percentage-to-pixel conversion, auto-detect heuristic, and resolution independence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| data/fonts | ||
| CMakeLists.txt | ||
| main.cpp | ||
| zm_box.cpp | ||
| zm_catch2.h | ||
| zm_comms.cpp | ||
| zm_crypt.cpp | ||
| zm_font.cpp | ||
| zm_onvif_renewal.cpp | ||
| zm_poly.cpp | ||
| zm_utils.cpp | ||
| zm_vector2.cpp | ||
| zm_zone.cpp | ||