updateFirmware
suspend fun updateFirmware(apiPath: String, filePaths: List<String>, connectionTimeout: Long, socketTimeout: Long, callback: (Int) -> Unit? = null)
Update the firmware of Theta using non-public API. In case of Theta SC2, power off and on by hand is needed after this command finishes. If target Theta is in insufficient charge, Theta may disconnect the socket.
Parameters
apiPath
The path of firmware update API which is non-public.
filePaths
List of firmware file path.
connectionTimeout
Timeout (milli seconds) of socket connection
socketTimeout
Timeout (milli seconds) of socket
callback
function to pass the percentage of sent firmware. After sending firmware, several minutes may be needed to start firmware update.
Throws
If an error occurs in THETA.