specifying invalid path flag address

Arthur Paulino 2018-01-13 07:41:17 -03:00
parent a7f1705df1
commit 0932707c5f

@ -14,7 +14,7 @@ Hardware ID: `0x0003`
| `3` | `LIDAR_GET_MAP` | `10 kJ` | Generate the current World's map and copy it to memory | | `3` | `LIDAR_GET_MAP` | `10 kJ` | Generate the current World's map and copy it to memory |
| `4` | `LIDAR_GET_WORLD_POS` | `0 kJ` | Copy the current (x,y) coordinates in the Universe in the X and Y registers | | `4` | `LIDAR_GET_WORLD_POS` | `0 kJ` | Copy the current (x,y) coordinates in the Universe in the X and Y registers |
`LIDAR_GET_PATH` generates a path as a direction sequence of 1 word each starting at memory address `0x0000`. You indicate the coordinates of the destination with the X and Y registers, and specify the desired range (Manhattan distance from the destination) with the B register. For example, if you want to get within 1 tile of a biomass blob, specify a distance of `1`. 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. `LIDAR_GET_PATH` generates a path as a direction sequence of 1 word each starting at memory address `0x0000`. You indicate the coordinates of the destination with the X and Y registers, and specify the desired range (Manhattan distance from the destination) with the B register. For example, if you want to get within 1 tile of a biomass blob, specify a distance of `1`. The last word in the sequence is `0xAAAA` to indicate the end of the path. A single value of `0xFFFF` is set at memory address `0x0000` to indicate an invalid path.
`NORTH` = `0x0000` `NORTH` = `0x0000`
`EAST` = `0x0001` `EAST` = `0x0001`
`SOUTH` = `0x0002` `SOUTH` = `0x0002`