bringing back show ports (#377)
* bringing back show ports * added firmware links in docs * updated color rendering * better rendering of touch/ultra/ir * better data per sensor
This commit is contained in:
@ -56,7 +56,7 @@ namespace sensors {
|
||||
|
||||
const __remoteButtons: RemoteInfraredBeaconButton[] = [];
|
||||
function __irButton(id: InfraredRemoteButton): RemoteInfraredBeaconButton {
|
||||
for(let i = 0; i < __remoteButtons.length; ++i) {
|
||||
for (let i = 0; i < __remoteButtons.length; ++i) {
|
||||
if (__remoteButtons[i].position == id)
|
||||
return __remoteButtons[i];
|
||||
}
|
||||
@ -161,6 +161,14 @@ namespace sensors {
|
||||
return 0
|
||||
}
|
||||
|
||||
_info(): string {
|
||||
if (this.mode == InfraredSensorMode.RemoteControl)
|
||||
return "remote";
|
||||
else if (this.mode == InfraredSensorMode.Proximity)
|
||||
return `${this._query()}%`;
|
||||
return "";
|
||||
}
|
||||
|
||||
_update(prev: number, curr: number) {
|
||||
if (this.mode == InfraredSensorMode.RemoteControl) {
|
||||
for (let i = 0; i < __remoteButtons.length; ++i) {
|
||||
|
Reference in New Issue
Block a user