Revert check for plain sn range

This commit is contained in:
jbr7rr 2024-01-22 20:23:31 +01:00 committed by Casper V. Kristensen
parent 0e61114851
commit bca09376e7

View file

@ -6,6 +6,9 @@ import info.nightscout.pump.medtrum.encryption.Crypt
class MedtrumSnUtil { class MedtrumSnUtil {
fun getDeviceTypeFromSerial(serial: Long): ModelType { fun getDeviceTypeFromSerial(serial: Long): ModelType {
if (serial in 106000000..106999999) {
return ModelType.INVALID
}
return when (Crypt().simpleDecrypt(serial)) { return when (Crypt().simpleDecrypt(serial)) {
in 126000000..126999999 -> ModelType.MD0201 in 126000000..126999999 -> ModelType.MD0201