Pebble: on FW 2.x do not send extended music info and do not send playstate

I don't think they are supported and I cannot test.
master
Andreas Shimokawa 2016-06-19 12:17:19 +02:00
parent b2bae26d7d
commit f42899d910
1 changed files with 5 additions and 1 deletions

View File

@ -1108,6 +1108,10 @@ public class PebbleProtocol extends GBDeviceProtocol {
}
public byte[] encodeSetMusicState(byte state, int position, int playRate, byte shuffle, byte repeat) {
if (mFwMajor < 3) {
return null;
}
byte playState;
switch (state) {
@ -1143,7 +1147,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
@Override
public byte[] encodeSetMusicInfo(String artist, String album, String track, int duration, int trackCount, int trackNr) {
String[] parts = {artist, album, track};
if (duration == 0) {
if (duration == 0 || mFwMajor < 3) {
return encodeMessage(ENDPOINT_MUSICCONTROL, MUSICCONTROL_SETMUSICINFO, 0, parts);
} else {
// Calculate length first