updating action labels

Arthur Paulino 2017-12-31 18:06:51 -03:00
parent 69b93ae0ba
commit f732be56bd

@ -9,19 +9,19 @@ Hardware ID: `0x0003`
### Interrupt Behavior
| Value of A | Action | Energy cost | Result |
| --- | --- | --- | --- |
| `1` | `GET_POS` | `0 kJ` | Copy the current (x,y) coordinates in the World in the X and Y registers |
| `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 |
| `4` | `GET_WORLD_POS` | `0 kJ` | Copy the current (x,y) coordinates in the Universe in the X and Y registers |
| `1` | `LIDAR_GET_POS` | `0 kJ` | Copy the current (x,y) coordinates in the World in the X and Y registers |
| `2` | `LIDAR_GET_PATH` | `50 kJ` | Calculate the shortest path to the specified coordinates 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 |
`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 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) ...
`LIDAR_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:
`1000 0000 0000 0000` (`0x8000`) : Blocked (wall) tile