Updated Hardware: LiDAR (markdown)

Simon Fortier 2018-11-27 13:55:02 -05:00
parent 08920491bd
commit e1641b4da1

@ -15,7 +15,7 @@ Hardware ID: `0x0003`
| `4` | `LIDAR_GET_WORLD_POS` | `0 kJ` | Copies the current (x,y) [universe coordinates](./Game-Universe) of the Cubot into the X and Y registers. |
#### LIDAR_GET_PATH
Generates a path as a sequence of words, each representing a direction. The generated path starts at the address `0x0000` but varies in length. It is terminated with the word `0xAAAA`, which represents the end of the path. If a path could not be generated, then the memory at address `0x0000` is set to `0xFFFF` (Note: The path terminator is not written for invalid paths).
Generates a path as a sequence of words, each representing a direction. The generated path starts at the address specified in the C register but varies in length. It is terminated with the word `0xAAAA`, which represents the end of the path. If a path could not be generated, then the memory at address specified in the C register is set to `0xFFFF` (Note: The path terminator is not written for invalid paths).
The coordinates of the destination are indicated with the X and Y registers. The desired range (Manhattan distance from the destination) is specified with the B register. For example, if you want to get within 1 tile of a biomass blob, specify a distance of `1`.
@ -30,7 +30,7 @@ The coordinates of the destination are indicated with the X and Y registers. The
##### Example generated path
The memory of a 4 tile path consisting of moving the Cubot north twice, once west, and then once east would look like:
| Address | `0x00` | `0x01` | `0x02` | `0x03` | `0x04` |
| Address | C | C + `0x01` | C + `0x02` | C + `0x03` | C + `0x04` |
| ------- | ------ | ------ | ------ | ------ | -------- |
| Value | `0x00` | `0x00` | `0x03` | `0x01` | `0xAAAA` |