diff --git a/Hardware:-LiDAR.md b/Hardware:-LiDAR.md index 1a929e4..d4e5044 100644 --- a/Hardware:-LiDAR.md +++ b/Hardware:-LiDAR.md @@ -14,12 +14,13 @@ Hardware ID: `0x0003` | `3` | `GET_MAP` | `10 kJ` | Generate the current World's map and copy it to memory | | `4` | `GET_WORLD_POS` | `0 kJ` | Copy the current (x,y) coordinates in the Universe in the X and Y registers | -`GET_PATH` generates a path as a direction sequence of 1 word each starting at memory address `0x0000` - `NORTH` = `0x0000` +`GET_PATH` generates a path as a direction sequence of 1 word each starting at memory address `0x0000`. The last word in the sequence is `0xAAAA` to indicate the end of the path. A single value of `0xFFFF` is set in memory to indicate an invalid path. +`NORTH` = `0x0000` `EAST` = `0x0001` `SOUTH` = `0x0002` `WEST` = `0x0003` + `GET_MAP` generates a map of the current world as a tile sequence of 256 words starting at memory address `0x0100`, each word representing a tile. The LiDAR starts reading the tiles west to east, north to south: (0,0) (1,0) (2,0) ... (15,0) (0,1) (1,1) ... Each tile is is encoded as a bit field: