more updates
This commit is contained in:
parent
1acb304e48
commit
88767e37fd
@ -270,9 +270,8 @@ void cUiUpdatePower(void)
|
|||||||
let devcon: Buffer = undefined;
|
let devcon: Buffer = undefined;
|
||||||
for (const sensorInfo of sensorInfos) {
|
for (const sensorInfo of sensorInfos) {
|
||||||
const newConn = conns[sensorInfo.port]
|
const newConn = conns[sensorInfo.port]
|
||||||
if (newConn == sensorInfo.connType) {
|
if (newConn == sensorInfo.connType)
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
sensorInfo.connType = newConn
|
sensorInfo.connType = newConn
|
||||||
sensorInfo.devType = DAL.DEVICE_TYPE_NONE
|
sensorInfo.devType = DAL.DEVICE_TYPE_NONE
|
||||||
@ -305,10 +304,9 @@ void cUiUpdatePower(void)
|
|||||||
if (devcon) {
|
if (devcon) {
|
||||||
setUartModes(devcon);
|
setUartModes(devcon);
|
||||||
for (const sensorInfo of sensorInfos.filter(si => si.connType == DAL.CONN_INPUT_UART)) {
|
for (const sensorInfo of sensorInfos.filter(si => si.connType == DAL.CONN_INPUT_UART)) {
|
||||||
const uinfo = readUartInfo(sensorInfo.port, 0);
|
const uinfo = readUartInfo(sensorInfo.port, devcon[DevConOff.Mode + sensorInfo.port]);
|
||||||
sensorInfo.devType = uinfo[TypesOff.Type]
|
sensorInfo.devType = uinfo[TypesOff.Type];
|
||||||
const mode = uinfo[TypesOff.Mode];
|
control.dmesg(`UART type ${sensorInfo.devType}`)
|
||||||
control.dmesg(`UART type ${sensorInfo.devType} mode ${mode}`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,8 +345,7 @@ void cUiUpdatePower(void)
|
|||||||
buf[UartCtlOff.Port] = port
|
buf[UartCtlOff.Port] = port
|
||||||
buf[UartCtlOff.Mode] = mode
|
buf[UartCtlOff.Mode] = mode
|
||||||
uartMM.ioctl(IO.UART_READ_MODE_INFO, buf)
|
uartMM.ioctl(IO.UART_READ_MODE_INFO, buf)
|
||||||
control.dmesg(`UART_READ_MODE ${buf.toHex()}`)
|
control.dmesg(`UART_READ_MODE t:${buf[TypesOff.Type]} c:${buf[TypesOff.Connection]} m:${buf[TypesOff.Mode]} n:${buf.slice(0, 12).toHex()}`);
|
||||||
control.dmesg(`t:${buf[TypesOff.Type]} c:${buf[TypesOff.Connection]} m:${buf[TypesOff.Mode]} n:${buf.slice(0, 12).toHex()}`);
|
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user