1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-20 12:00:51 +02:00

Add additional smart wakeup functionality in test device

Code by José Rebelo:
https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3583#issuecomment-1571835
This commit is contained in:
Martin.JM 2024-02-18 19:01:19 +01:00
parent 275b662188
commit 22e51f841b
2 changed files with 8 additions and 2 deletions

View File

@ -203,12 +203,17 @@ public class TestDeviceCoordinator extends AbstractDeviceCoordinator {
@Override
public int getAlarmSlotCount(final GBDevice device) {
return super.getAlarmSlotCount(device);
return 5;
}
@Override
public boolean supportsSmartWakeup(final GBDevice device, int position) {
return supports(getTestDevice(), TestFeature.SMART_WAKEUP);
return supports(getTestDevice(), TestFeature.SMART_WAKEUP) && position <= 2;
}
@Override
public boolean forcedSmartWakeup(final GBDevice device, final int alarmPosition) {
return supports(getTestDevice(), TestFeature.SMART_WAKEUP_FORCED_SLOT) && alarmPosition == 0;
}
@Override

View File

@ -56,6 +56,7 @@ public enum TestFeature {
SCREENSHOTS,
SLEEP_RESPIRATORY_RATE,
SMART_WAKEUP,
SMART_WAKEUP_FORCED_SLOT,
SPO2,
STRESS_MEASUREMENT,
UNICODE_EMOJIS,