- added firmware versions

- changed faulty init in RadioResponse
- added some logging
This commit is contained in:
Andy Rozman 2020-08-02 14:46:07 +01:00
parent faeb2576a9
commit 11c71149ad
4 changed files with 6 additions and 3 deletions

View file

@ -66,6 +66,7 @@ public class RFSpy {
injector.androidInjector().inject(this); injector.androidInjector().inject(this);
this.injector = injector; this.injector = injector;
this.rileyLinkBle = rileyLinkBle; this.rileyLinkBle = rileyLinkBle;
aapsLogger.debug("RileyLinkServiceData:" + aapsLogger);
reader = new RFSpyReader(aapsLogger, rileyLinkBle); reader = new RFSpyReader(aapsLogger, rileyLinkBle);
} }

View file

@ -46,6 +46,7 @@ public class RFSpyReader {
} }
void setRileyLinkEncodingType(RileyLinkEncodingType encodingType) { void setRileyLinkEncodingType(RileyLinkEncodingType encodingType) {
aapsLogger.debug("setRileyLinkEncodingType: " + encodingType);
stopAtNull = !(encodingType == RileyLinkEncodingType.Manchester || // stopAtNull = !(encodingType == RileyLinkEncodingType.Manchester || //
encodingType == RileyLinkEncodingType.FourByteSixByteRileyLink); encodingType == RileyLinkEncodingType.FourByteSixByteRileyLink);
} }

View file

@ -77,7 +77,7 @@ public class RadioResponse {
byte[] encodedPayload; byte[] encodedPayload;
if (RileyLinkFirmwareVersion.isSameVersion(rileyLinkServiceData.versionCC110, if (RileyLinkFirmwareVersion.isSameVersion(rileyLinkServiceData.versionCC110,
RileyLinkFirmwareVersion.Version2)) { 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];

View file

@ -12,11 +12,12 @@ public enum RileyLinkFirmwareVersion {
Version_1_0(1, 0, "1.0"), // Version_1_0(1, 0, "1.0"), //
Version_2_0(2, 0, "2.0"), // Version_2_0(2, 0, "2.0"), //
Version_2_2(2, 2, "2.2"), // Version_2_2(2, 2, "2.2"), //
Version_3_0(3, 0, "3.0"), // Version_3_x(3, 0, "3.x"), //
Version_4_x(4, 0, "4.x"), //
UnknownVersion(0, 0, "???"), // UnknownVersion(0, 0, "???"), //
Version1(Version_0_0, Version_0_9, Version_1_0), // Version1(Version_0_0, Version_0_9, Version_1_0), //
Version2(Version_2_0, Version_2_2), // Version2(Version_2_0, Version_2_2), //
Version2AndHigher(Version_2_0, Version_2_2, Version_3_0), // Version2AndHigher(Version_2_0, Version_2_2, Version_3_x, Version_4_x), //
; ;
private static final String FIRMWARE_IDENTIFICATION_PREFIX = "subg_rfspy "; private static final String FIRMWARE_IDENTIFICATION_PREFIX = "subg_rfspy ";