mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-14 11:47:32 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c43a564a47
@ -69,6 +69,7 @@ public class GBDaoGenerator {
|
||||
addHPlusHealthActivitySample(schema, user, device);
|
||||
addNo1F1ActivitySample(schema, user, device);
|
||||
addXWatchActivitySample(schema, user, device);
|
||||
addZeTimeActivitySample(schema, user, device);
|
||||
|
||||
addCalendarSyncState(schema, device);
|
||||
|
||||
@ -286,6 +287,20 @@ public class GBDaoGenerator {
|
||||
return activitySample;
|
||||
}
|
||||
|
||||
private static Entity addZeTimeActivitySample(Schema schema, Entity user, Entity device) {
|
||||
Entity activitySample = addEntity(schema, "ZeTimeActivitySample");
|
||||
activitySample.implementsSerializable();
|
||||
addCommonActivitySampleProperties("AbstractActivitySample", activitySample, user, device);
|
||||
activitySample.addIntProperty(SAMPLE_STEPS).notNull().codeBeforeGetterAndSetter(OVERRIDE);
|
||||
activitySample.addIntProperty(SAMPLE_RAW_KIND).notNull().codeBeforeGetterAndSetter(OVERRIDE);
|
||||
activitySample.addIntProperty(SAMPLE_RAW_INTENSITY).notNull().codeBeforeGetterAndSetter(OVERRIDE);
|
||||
addHeartRateProperties(activitySample);
|
||||
activitySample.addIntProperty("caloriesBurnt");
|
||||
activitySample.addIntProperty("distanceMeters");
|
||||
activitySample.addIntProperty("activeTimeMinutes");
|
||||
return activitySample;
|
||||
}
|
||||
|
||||
private static void addCommonActivitySampleProperties(String superClass, Entity activitySample, Entity user, Entity device) {
|
||||
activitySample.setSuperclass(superClass);
|
||||
activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");
|
||||
|
@ -399,7 +399,7 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
} else if (what == Scanning.SCANNING_NEW_BTLE) {
|
||||
if (GB.supportsBluetoothLE()) {
|
||||
startNEWBTLEDiscovery();
|
||||
} else {
|
||||
} else {
|
||||
discoveryFinished();
|
||||
}
|
||||
}
|
||||
@ -433,15 +433,20 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
}
|
||||
|
||||
private void stopBTLEDiscovery() {
|
||||
adapter.stopLeScan(leScanCallback);
|
||||
if (adapter != null)
|
||||
adapter.stopLeScan(leScanCallback);
|
||||
}
|
||||
|
||||
private void stopBTDiscovery() {
|
||||
adapter.cancelDiscovery();
|
||||
if (adapter != null)
|
||||
adapter.cancelDiscovery();
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private void stopNewBTLEDiscovery() {
|
||||
if (adapter == null)
|
||||
return;
|
||||
|
||||
BluetoothLeScanner bluetoothLeScanner = adapter.getBluetoothLeScanner();
|
||||
if (bluetoothLeScanner == null) {
|
||||
LOG.warn("could not get BluetoothLeScanner()!");
|
||||
@ -520,10 +525,10 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private void startNEWBTLEDiscovery() {
|
||||
// Only use new API when user uses Lollipop+ device
|
||||
LOG.info("Start New BTLE Discovery");
|
||||
handler.removeMessages(0, stopRunnable);
|
||||
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);
|
||||
adapter.getBluetoothLeScanner().startScan(getScanFilters(), getScanSettings(), getScanCallback());
|
||||
LOG.info("Start New BTLE Discovery");
|
||||
handler.removeMessages(0, stopRunnable);
|
||||
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);
|
||||
adapter.getBluetoothLeScanner().startScan(getScanFilters(), getScanSettings(), getScanCallback());
|
||||
}
|
||||
|
||||
private List<ScanFilter> getScanFilters() {
|
||||
|
@ -0,0 +1,92 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.zetime;
|
||||
|
||||
/**
|
||||
* Created by lightforce on 08.06.18.
|
||||
*/
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ZeTimeConstants {
|
||||
public static final UUID UUID_WRITE_CHARACTERISTIC = UUID.fromString("00008001-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_ACK_CHARACTERISTIC = UUID.fromString("00008002-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_REPLY_CHARACTERISTIC = UUID.fromString("00008003-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_NOTIFY_CHARACTERISTIC = UUID.fromString("00008004-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_CHARACTERISTIC_8005 = UUID.fromString("00008005-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_CHARACTERISTIC_HEART_RATE = UUID.fromString("00002a37-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_CONFIG_DESCRIPTOR = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_SERVICE_BASE = UUID.fromString("00006006-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_SERVICE_EXTEND = UUID.fromString("00007006-0000-1000-8000-00805f9b34fb");
|
||||
public static final UUID UUID_SERVICE_HEART_RATE = UUID.fromString("0000180d-0000-1000-8000-00805f9b34fb");
|
||||
|
||||
public static final byte CMD_PREAMBLE = (byte) 0x6f;
|
||||
// list all available commands
|
||||
public static final byte CMD_RESPOND = (byte) 0x01;
|
||||
public static final byte CMD_WATCH_ID = (byte) 0x02;
|
||||
public static final byte CMD_DEVICE_VERSION = (byte) 0x03;
|
||||
public static final byte CMD_DATE_TIME = (byte) 0x04;
|
||||
public static final byte CMD_TIME_SURFACE_SETTINGS = (byte) 0x05;
|
||||
public static final byte CMD_SURFACE_DISPLAY_SETTIGNS = (byte) 0x06;
|
||||
public static final byte CMD_SCREEN_BRIGHTNESS = (byte) 0x07;
|
||||
public static final byte CMD_BATTERY_POWER = (byte) 0x08;
|
||||
public static final byte CMD_VOLUME_SETTINGS = (byte) 0x09;
|
||||
public static final byte CMD_SHOCK_MODE = (byte) 0x0A;
|
||||
public static final byte CMD_LANGUAGE_SETTINGS = (byte) 0x0B;
|
||||
public static final byte CMD_UNIT_SETTINGS = (byte) 0x0C;
|
||||
public static final byte CMD_FACTORY_RESTORE = (byte) 0x0D;
|
||||
public static final byte CMD_ENTER_UPGRADE_MODE = (byte) 0x0E;
|
||||
public static final byte CMD_SHOCK_STRENGTH = (byte) 0x10;
|
||||
public static final byte CMD_WORK_MODE = (byte) 0x12;
|
||||
public static final byte CMD_SCREEN_ON_TIME = (byte) 0x13;
|
||||
public static final byte CMD_SNOOZE = (byte) 0x14;
|
||||
public static final byte CMD_DO_NOT_DISTURB = (byte) 0x15;
|
||||
public static final byte CMD_USER_INFO = (byte) 0x30;
|
||||
public static final byte CMD_USAGE_HABITS = (byte) 0x31;
|
||||
public static final byte CMD_USER_NAME = (byte) 0x32;
|
||||
public static final byte CMD_GOALS = (byte) 0x50;
|
||||
public static final byte CMD_AVAIABLE_DATA = (byte) 0x52;
|
||||
public static final byte CMD_DELETE_STEP_COUNT = (byte) 0x53;
|
||||
public static final byte CMD_GET_STEP_COUNT = (byte) 0x54;
|
||||
public static final byte CMD_DELETE_SLEEP_DATA = (byte) 0x55;
|
||||
public static final byte CMD_GET_SLEEP_DATA = (byte) 0x56;
|
||||
public static final byte CMD_DELETE_HEARTRATE_DATA = (byte) 0x5A;
|
||||
public static final byte CMD_GET_HEARTRATE_DATA = (byte) 0x5B;
|
||||
public static final byte CMD_AUTO_HEARTRATE = (byte) 0x5C;
|
||||
public static final byte CMD_HEARTRATE_ALARM_LIMITS = (byte) 0x5D;
|
||||
public static final byte CMD_INACTIVITY_ALERT = (byte) 0x5E;
|
||||
public static final byte CMD_CALORIES_TYPE = (byte) 0x60;
|
||||
public static final byte CMD_GET_HEARTRATE_EXDATA = (byte) 0x61;
|
||||
public static final byte CMD_PUSH_EX_MSG = (byte) 0x76;
|
||||
public static final byte CMD_PUSH_WEATHER_DATA = (byte) 0x77;
|
||||
public static final byte CMD_PUSH_CALENDAR_DAY = (byte) 0x99;
|
||||
public static final byte CMD_MUSIC_CONTROL = (byte) 0xD0;
|
||||
// here are the action commands
|
||||
public static final byte CMD_REQUEST = (byte) 0x70;
|
||||
public static final byte CMD_SEND = (byte) 0x71;
|
||||
public static final byte CMD_REQUEST_RESPOND = (byte) 0x80;
|
||||
// further commands
|
||||
public static final byte CMD_END = (byte) 0x8f;
|
||||
public static final byte CMD_ACK_WRITE = (byte) 0x03;
|
||||
// notification types and icons
|
||||
public static final byte NOTIFICATION_MISSED_CALL = (byte) 0x00;
|
||||
public static final byte NOTIFICATION_SMS = (byte) 0x01;
|
||||
public static final byte NOTIFICATION_SOCIAL = (byte) 0x02;
|
||||
public static final byte NOTIFICATION_EMAIL = (byte) 0x03;
|
||||
public static final byte NOTIFICATION_CALENDAR = (byte) 0x04;
|
||||
public static final byte NOTIFICATION_INCOME_CALL = (byte) 0x05;
|
||||
public static final byte NOTIFICATION_CALL_OFF = (byte) 0x06;
|
||||
public static final byte NOTIFICATION_WECHAT = (byte) 0x07;
|
||||
public static final byte NOTIFICATION_VIBER = (byte) 0x08;
|
||||
public static final byte NOTIFICATION_SNAPCHAT = (byte) 0x09;
|
||||
public static final byte NOTIFICATION_WHATSAPP = (byte) 0x0A;
|
||||
public static final byte NOTIFICATION_QQ = (byte) 0x0B;
|
||||
public static final byte NOTIFICATION_FACEBOOK = (byte) 0x0C;
|
||||
public static final byte NOTIFICATION_HANGOUTS = (byte) 0x0D;
|
||||
public static final byte NOTIFICATION_GMAIL = (byte) 0x0E;
|
||||
public static final byte NOTIFICATION_MESSENGER = (byte) 0x0F;
|
||||
public static final byte NOTIFICATION_INSTAGRAM = (byte) 0x10;
|
||||
public static final byte NOTIFICATION_TWITTER = (byte) 0x11;
|
||||
public static final byte NOTIFICATION_LINKEDIN = (byte) 0x12;
|
||||
public static final byte NOTIFICATION_UBER = (byte) 0x13;
|
||||
public static final byte NOTIFICATION_LINE = (byte) 0x14;
|
||||
public static final byte NOTIFICATION_SKYPE = (byte) 0x15;
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.zetime;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.bluetooth.le.ScanFilter;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
/**
|
||||
* Created by lightwars on 06.02.18.
|
||||
*/
|
||||
|
||||
public class ZeTimeCoordinator extends AbstractDeviceCoordinator {
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.ZETIME;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Collection<? extends ScanFilter> createBLEScanFilters() {
|
||||
return super.createBLEScanFilters();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
String name = candidate.getDevice().getName();
|
||||
if (name != null && name.startsWith("ZeTime")) {
|
||||
return DeviceType.ZETIME;
|
||||
}
|
||||
return DeviceType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<? extends Activity> getPairingActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsScreenshots() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAlarmConfiguration() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWeather() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturer() {
|
||||
return "MyKronoz";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityTracking() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getAppsManagementActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsHeartRateMeasurement(GBDevice device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsAppsManagement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCalendarEvents() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice device, DaoSession session) {
|
||||
return new ZeTimeSampleProvider(device, session);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSmartWakeup(GBDevice device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRealtimeData() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle(GBDevice device) {
|
||||
return BONDING_STYLE_NONE;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.zetime;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import de.greenrobot.dao.AbstractDao;
|
||||
import de.greenrobot.dao.Property;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractSampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.ZeTimeActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.ZeTimeActivitySampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class ZeTimeSampleProvider extends AbstractSampleProvider<ZeTimeActivitySample> {
|
||||
|
||||
private final float movementDivisor = 6000.0f;
|
||||
private GBDevice mDevice;
|
||||
private DaoSession mSession;
|
||||
|
||||
public ZeTimeSampleProvider(GBDevice device, DaoSession session) {
|
||||
super(device, session);
|
||||
|
||||
mSession = session;
|
||||
mDevice = device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int normalizeType(int rawType) {
|
||||
return rawType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int toRawActivityKind(int activityKind) {
|
||||
return activityKind;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float normalizeIntensity(int rawIntensity) {
|
||||
return rawIntensity/movementDivisor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZeTimeActivitySample createActivitySample() {
|
||||
return new ZeTimeActivitySample();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractDao<ZeTimeActivitySample, ?> getSampleDao() {
|
||||
return getSession().getZeTimeActivitySampleDao();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected Property getRawKindSampleProperty() {
|
||||
return ZeTimeActivitySampleDao.Properties.RawKind;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected Property getTimestampSampleProperty() {
|
||||
return ZeTimeActivitySampleDao.Properties.Timestamp;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected Property getDeviceIdentifierSampleProperty() {
|
||||
return ZeTimeActivitySampleDao.Properties.DeviceId;
|
||||
}
|
||||
}
|
@ -46,7 +46,8 @@ public enum DeviceType {
|
||||
NO1F1(50, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled, R.string.devicetype_no1_f1),
|
||||
TECLASTH30(60, R.drawable.ic_device_h30_h10, R.drawable.ic_device_h30_h10_disabled, R.string.devicetype_teclast_h30),
|
||||
XWATCH(70, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_xwatch),
|
||||
ID115(80, R.drawable.ic_device_h30_h10, R.drawable.ic_device_h30_h10_disabled, R.string.devicetype_id115),
|
||||
ZETIME(80, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_mykronoz_zetime),
|
||||
ID115(90, R.drawable.ic_device_h30_h10, R.drawable.ic_device_h30_h10_disabled, R.string.devicetype_id115),
|
||||
TEST(1000, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_test);
|
||||
|
||||
private final int key;
|
||||
|
@ -599,4 +599,114 @@ public class Weather {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static byte mapToZeTimeCondition(int openWeatherMapCondition) {
|
||||
/* deducted values:
|
||||
0 = partly cloudy
|
||||
1 = cloudy
|
||||
2 = sunny
|
||||
3 = windy/gale
|
||||
4 = heavy rain
|
||||
5 = snowy
|
||||
6 = storm
|
||||
*/
|
||||
switch (openWeatherMapCondition) {
|
||||
//Group 2xx: Thunderstorm
|
||||
case 200: //thunderstorm with light rain: //11d
|
||||
case 201: //thunderstorm with rain: //11d
|
||||
case 202: //thunderstorm with heavy rain: //11d
|
||||
case 210: //light thunderstorm:: //11d
|
||||
case 211: //thunderstorm: //11d
|
||||
case 230: //thunderstorm with light drizzle: //11d
|
||||
case 231: //thunderstorm with drizzle: //11d
|
||||
case 232: //thunderstorm with heavy drizzle: //11d
|
||||
case 212: //heavy thunderstorm: //11d
|
||||
case 221: //ragged thunderstorm: //11d
|
||||
//Group 7xx: Atmosphere
|
||||
case 771: //squalls: //[[file:50d.png]]
|
||||
case 781: //tornado: //[[file:50d.png]]
|
||||
//Group 90x: Extreme
|
||||
case 900: //tornado
|
||||
case 901: //tropical storm
|
||||
//Group 9xx: Additional
|
||||
case 960: //storm
|
||||
case 961: //violent storm
|
||||
case 902: //hurricane
|
||||
case 962: //hurricane
|
||||
return 6;
|
||||
//Group 3xx: Drizzle
|
||||
case 300: //light intensity drizzle: //09d
|
||||
case 301: //drizzle: //09d
|
||||
case 302: //heavy intensity drizzle: //09d
|
||||
case 310: //light intensity drizzle rain: //09d
|
||||
case 311: //drizzle rain: //09d
|
||||
case 312: //heavy intensity drizzle rain: //09d
|
||||
case 313: //shower rain and drizzle: //09d
|
||||
case 314: //heavy shower rain and drizzle: //09d
|
||||
case 321: //shower drizzle: //09d
|
||||
//Group 5xx: Rain
|
||||
case 500: //light rain: //10d
|
||||
case 501: //moderate rain: //10d
|
||||
case 502: //heavy intensity rain: //10d
|
||||
case 503: //very heavy rain: //10d
|
||||
case 504: //extreme rain: //10d
|
||||
case 511: //freezing rain: //13d
|
||||
case 520: //light intensity shower rain: //09d
|
||||
case 521: //shower rain: //09d
|
||||
case 522: //heavy intensity shower rain: //09d
|
||||
case 531: //ragged shower rain: //09d
|
||||
//Group 90x: Extreme
|
||||
case 906: //hail
|
||||
return 4;
|
||||
//Group 6xx: Snow
|
||||
case 600: //light snow: //[[file:13d.png]]
|
||||
case 601: //snow: //[[file:13d.png]]
|
||||
case 620: //light shower snow: //[[file:13d.png]]
|
||||
case 602: //heavy snow: //[[file:13d.png]]
|
||||
case 611: //sleet: //[[file:13d.png]]
|
||||
case 612: //shower sleet: //[[file:13d.png]]
|
||||
case 621: //shower snow: //[[file:13d.png]]
|
||||
case 622: //heavy shower snow: //[[file:13d.png]]
|
||||
case 615: //light rain and snow: //[[file:13d.png]]
|
||||
case 616: //rain and snow: //[[file:13d.png]]
|
||||
//Group 90x: Extreme
|
||||
case 903: //cold
|
||||
return 5;
|
||||
//Group 7xx: Atmosphere
|
||||
case 701: //mist: //[[file:50d.png]]
|
||||
case 711: //smoke: //[[file:50d.png]]
|
||||
case 721: //haze: //[[file:50d.png]]
|
||||
case 731: //sandcase dust whirls: //[[file:50d.png]]
|
||||
case 741: //fog: //[[file:50d.png]]
|
||||
case 751: //sand: //[[file:50d.png]]
|
||||
case 761: //dust: //[[file:50d.png]]
|
||||
case 762: //volcanic ash: //[[file:50d.png]]
|
||||
return 1;
|
||||
//Group 800: Clear
|
||||
case 800: //clear sky: //[[file:01d.png]] [[file:01n.png]]
|
||||
//Group 90x: Extreme
|
||||
case 904: //hot
|
||||
return 2;
|
||||
//Group 80x: Clouds
|
||||
case 801: //few clouds: //[[file:02d.png]] [[file:02n.png]]
|
||||
case 802: //scattered clouds: //[[file:03d.png]] [[file:03d.png]]
|
||||
case 803: //broken clouds: //[[file:04d.png]] [[file:03d.png]]
|
||||
case 804: //overcast clouds: //[[file:04d.png]] [[file:04d.png]]
|
||||
default:
|
||||
return 0;
|
||||
|
||||
//Group 9xx: Additional
|
||||
case 905: //windy
|
||||
case 951: //calm
|
||||
case 952: //light breeze
|
||||
case 953: //gentle breeze
|
||||
case 954: //moderate breeze
|
||||
case 955: //fresh breeze
|
||||
case 956: //strong breeze
|
||||
case 957: //high windcase near gale
|
||||
case 958: //gale
|
||||
case 959: //severe gale
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.Vibrati
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.hplus.HPlusSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.TeclastH30Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
public class DeviceSupportFactory {
|
||||
@ -152,6 +153,8 @@ public class DeviceSupportFactory {
|
||||
break;
|
||||
case XWATCH:
|
||||
deviceSupport = new ServiceDeviceSupport(new XWatchSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
case ZETIME:
|
||||
deviceSupport = new ServiceDeviceSupport(new ZeTimeDeviceSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
break;
|
||||
case ID115:
|
||||
deviceSupport = new ServiceDeviceSupport(new ID115Support(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.no1f1.No1F1Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.vibratissimo.VibratissimoCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xwatch.XWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.zetime.ZeTimeCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DeviceAttributes;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
@ -212,6 +213,7 @@ public class DeviceHelper {
|
||||
result.add(new EXRIZUK8Coordinator());
|
||||
result.add(new TeclastH30Coordinator());
|
||||
result.add(new XWatchCoordinator());
|
||||
result.add(new ZeTimeCoordinator());
|
||||
result.add(new ID115Coordinator());
|
||||
|
||||
return result;
|
||||
|
@ -571,6 +571,7 @@
|
||||
<string name="devicetype_no1_f1">No.1 F1</string>
|
||||
<string name="devicetype_teclast_h30">Teclast H30</string>
|
||||
<string name="devicetype_xwatch">XWatch</string>
|
||||
<string name="devicetype_mykronoz_zetime">MyKronoz ZeTime</string>
|
||||
<string name="devicetype_id115">ID115</string>
|
||||
|
||||
<string name="choose_auto_export_location">Choose export location</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user