assert nscliet is running in RunningConfiguration

This commit is contained in:
Milos Kozak 2021-11-12 10:29:17 +01:00
parent 50861f237d
commit 00fb5bd6ce

View file

@ -61,6 +61,8 @@ class RunningConfiguration @Inject constructor(
// called in NSClient mode only
fun apply(configuration: JSONObject) {
assert(config.NSCLIENT)
if (configuration.has("version")) {
rxBus.send(EventNSClientNewLog("VERSION", "Received AndroidAPS version ${configuration.getString("version")}"))
if (config.VERSION_NAME.startsWith(configuration.getString("version")).not()) {