1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 01:55:50 +01:00

Merge branch 'master' into appmanager-fragments

This commit is contained in:
Andreas Shimokawa 2016-06-15 22:53:41 +02:00
commit 1c6c78507c
3 changed files with 13 additions and 5 deletions

View File

@ -103,7 +103,7 @@ public class PBWReader {
* we still prefer the subfolders if present.
* chalk needs to be its subfolder
*/
if (platform.equals("aplite") || platform.equals("basalt")) {
if (platform.equals("aplite") || platform.equals("basalt") || platform.equals("diorite")) {
boolean hasPlatformDir = false;
InputStream afin = new BufferedInputStream(cr.openInputStream(uri));

View File

@ -245,15 +245,19 @@ public class PebbleProtocol extends GBDeviceProtocol {
static final long GB_UUID_MASK = 0x4767744272646700L;
// base is -5
// base is -8
private static final String[] hwRevisions = {
// Emulator
"spalding_bb2", "snowy_bb2", "snowy_bb", "bb2", "bb",
"silk_bb2", "unknown", "silk_bb",
"spalding_bb2", "snowy_bb2", "snowy_bb",
"bb2", "bb",
"unknown",
// Pebble
"ev1", "ev2", "ev2_3", "ev2_4", "v1_5", "v2_0",
// Pebble Time
"snowy_evt2", "snowy_dvt", "spalding_dvt", "snowy_s3", "spalding"
"snowy_evt2", "snowy_dvt", "spalding_dvt", "snowy_s3", "spalding",
// Pebble 2
"silk_evt", "unknown", "silk"
};
private static final Random mRandom = new Random();
@ -2041,7 +2045,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
}
buf.get(tmp, 0, 9);
int hwRev = buf.get() + 5;
int hwRev = buf.get() + 8;
if (hwRev >= 0 && hwRev < hwRevisions.length) {
versionCmd.hwVersion = hwRevisions[hwRev];
}

View File

@ -7,6 +7,8 @@ public class PebbleUtils {
platformName = "basalt";
} else if (hwRev.startsWith("spalding")) {
platformName = "chalk";
} else if (hwRev.startsWith("silk")) {
platformName = "diorite";
} else {
platformName = "aplite";
}
@ -20,6 +22,8 @@ public class PebbleUtils {
model = "pebble_time_black";
} else if (hwRev.startsWith("spalding")) {
model = "pebble_time_round_black_20mm";
} else if (hwRev.startsWith("silk")) {
model = "pebble2_black";
} else {
model = "pebble_black";
}