-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from pioneers/device-info
Communicate with Runtime and display peripheral info
- Loading branch information
Showing
21 changed files
with
1,099 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Maps device types to user-friendly names. | ||
*/ | ||
export const DeviceTypes: { [type: number]: string } = { | ||
0: 'Dummy device', | ||
1: 'Limit switch', | ||
2: 'Line follower', | ||
3: 'Battery buzzer', | ||
4: 'Servo controller', | ||
5: 'Polar bear motor controller', | ||
6: 'KoalaBear motor controller', | ||
7: 'Power distribution board', | ||
8: 'Distance sensor', | ||
}; | ||
|
||
/** | ||
* Represents one lowcar device and its reported data. | ||
*/ | ||
export default interface DeviceInfoState { | ||
/** | ||
* The device id: the device type and uid separated by an underscore. | ||
*/ | ||
id: string; | ||
/** | ||
* Human-presentable data reported by the device, by the keys used by Robot.get_value. | ||
*/ | ||
[key: string]: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.