mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 19:16:43 +00:00
Updated Hardware: LiDAR (markdown)
parent
efe4c19e1e
commit
6e1445c22c
@ -13,8 +13,13 @@ Hardware ID: `0x0003`
|
|||||||
| `2` | `GET_PATH` | `50 kJ` | Calculate the shortest path to the specified coordinates and copy it to memory|
|
| `2` | `GET_PATH` | `50 kJ` | Calculate the shortest path to the specified coordinates and copy it to memory|
|
||||||
| `3` | `GET_MAP` | `10 kJ` | Generate the current World's map and copy it to memory |
|
| `3` | `GET_MAP` | `10 kJ` | Generate the current World's map and copy it to memory |
|
||||||
|
|
||||||
`GET_PATH` Generates a path as a direction sequence of 1 word each starting at memory address `0x0000`
|
`GET_PATH` generates a path as a direction sequence of 1 word each starting at memory address `0x0000`
|
||||||
`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) ...
|
`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:
|
Each tile is is encoded as a bit field:
|
||||||
`1000 0000 0000 0000` (`0x8000`) : Blocked (wall) tile
|
`1000 0000 0000 0000` (`0x8000`) : Blocked (wall) tile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user