Change method access in RileyLinkFirmwareVersion
This commit is contained in:
parent
6ac449d684
commit
2ae84349ee
3 changed files with 3 additions and 5 deletions
|
@ -376,7 +376,7 @@ public class RFSpy {
|
||||||
private void setMedtronicEncoding() {
|
private void setMedtronicEncoding() {
|
||||||
RileyLinkEncodingType encoding = RileyLinkEncodingType.FourByteSixByteLocal;
|
RileyLinkEncodingType encoding = RileyLinkEncodingType.FourByteSixByteLocal;
|
||||||
|
|
||||||
if (RileyLinkFirmwareVersion.isSameVersion(rileyLinkServiceData.firmwareVersion, RileyLinkFirmwareVersion.Version2AndHigher)) {
|
if (rileyLinkServiceData.firmwareVersion.isSameVersion(RileyLinkFirmwareVersion.Version2AndHigher)) {
|
||||||
if (sp.getString(RileyLinkConst.Prefs.Encoding, "None")
|
if (sp.getString(RileyLinkConst.Prefs.Encoding, "None")
|
||||||
.equals(resourceHelper.gs(R.string.key_medtronic_pump_encoding_4b6b_rileylink))) {
|
.equals(resourceHelper.gs(R.string.key_medtronic_pump_encoding_4b6b_rileylink))) {
|
||||||
encoding = RileyLinkEncodingType.FourByteSixByteRileyLink;
|
encoding = RileyLinkEncodingType.FourByteSixByteRileyLink;
|
||||||
|
|
|
@ -74,8 +74,7 @@ public class RadioResponse {
|
||||||
}
|
}
|
||||||
byte[] encodedPayload;
|
byte[] encodedPayload;
|
||||||
|
|
||||||
if (RileyLinkFirmwareVersion.isSameVersion(rileyLinkServiceData.firmwareVersion,
|
if (rileyLinkServiceData.firmwareVersion.isSameVersion(RileyLinkFirmwareVersion.Version2AndHigher)) {
|
||||||
RileyLinkFirmwareVersion.Version2AndHigher)) {
|
|
||||||
encodedPayload = ByteUtil.substring(rxData, 3, rxData.length - 3);
|
encodedPayload = ByteUtil.substring(rxData, 3, rxData.length - 3);
|
||||||
rssi = rxData[1];
|
rssi = rxData[1];
|
||||||
responseNumber = rxData[2];
|
responseNumber = rxData[2];
|
||||||
|
|
|
@ -74,8 +74,7 @@ public enum RileyLinkFirmwareVersion {
|
||||||
return members;
|
return members;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean isSameVersion(RileyLinkFirmwareVersion versionWeCheck, RileyLinkFirmwareVersion versionSources) {
|
||||||
public static boolean isSameVersion(RileyLinkFirmwareVersion versionWeCheck, RileyLinkFirmwareVersion versionSources) {
|
|
||||||
if (versionWeCheck == versionSources) {
|
if (versionWeCheck == versionSources) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue