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:
Peli de Halleux
2018-03-28 08:50:14 -07:00
committed by GitHub
parent 89e1819399
commit 550528c695
9 changed files with 121 additions and 33 deletions

View File

@ -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) {