@mega-yfue/eufy-sdk / mapCellValue
Function: mapCellValue()
ts
function mapCellValue(map, cell): "unknown" | "obstacle" | "free" | "carpet" | undefined;What one cell of the map is — floor, wall, carpet or unexplored.
The plane packs four cells to a byte, two bits each, low bits first, in one run with no row padding: the cell at (col, row) is at bit (i & 3) * 2 of byte i >> 2, where i = row * width + col. undefined for a cell outside the map.
Parameters
map
cell
Returns
"unknown" | "obstacle" | "free" | "carpet" | undefined