mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 20:06:28 -08:00
portObj -> port
This commit is contained in:
1 parent
10df44ee2b
commit
e85bb26537
1 file changed
+2
-2
@@ -13,8 +13,8 @@ import com.fazecast.jSerialComm.SerialPort as JSerialPort
|
||||
class DesktopFlashingHandler : FlashingHandler {
|
||||
private var port: JSerialPort? = null
|
||||
|
||||
override fun openSerial(portObj: Any) {
|
||||
val portLocation = portObj as? String ?: error("expected port location string")
|
||||
override fun openSerial(port: Any) {
|
||||
val portLocation = port as? String ?: error("expected port location string")
|
||||
val comPort = JSerialPort.getCommPorts().find { it.portLocation == portLocation }
|
||||
?: error("Unable to find port $portLocation")
|
||||
if (comPort.isOpen) {
|
||||
|
||||
Reference in new issue
Block a user