Bugfixes
This commit is contained in:
parent
617aae5943
commit
17488b5c6b
@ -144,11 +144,11 @@ namespace input.internal {
|
|||||||
control.dmesg(`sensor set port ${port} on devtype=${this._deviceType()}`)
|
control.dmesg(`sensor set port ${port} on devtype=${this._deviceType()}`)
|
||||||
for (let i = 0; i < sensors.length; ++i) {
|
for (let i = 0; i < sensors.length; ++i) {
|
||||||
if (i != this.port && sensors[i].sensor == this) {
|
if (i != this.port && sensors[i].sensor == this) {
|
||||||
sensors[i] = null
|
sensors[i].sensor = null
|
||||||
sensors[i].manual = false
|
sensors[i].manual = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.port > 0) {
|
if (this.port >= 0) {
|
||||||
let prev = sensors[this.port].sensor
|
let prev = sensors[this.port].sensor
|
||||||
if (prev && prev != this)
|
if (prev && prev != this)
|
||||||
prev._setPort(0)
|
prev._setPort(0)
|
||||||
@ -209,7 +209,7 @@ namespace input.internal {
|
|||||||
|
|
||||||
protected _portUpdated() {
|
protected _portUpdated() {
|
||||||
this.realmode = -1
|
this.realmode = -1
|
||||||
if (this.port > 0) {
|
if (this.port >= 0) {
|
||||||
if (this.isManual()) {
|
if (this.isManual()) {
|
||||||
uartReset(this.port)
|
uartReset(this.port)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user