mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-02 03:16:07 +02:00
22 lines
476 B
Java
22 lines
476 B
Java
package nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.entities.activity;
|
|
|
|
public enum EventCode {
|
|
STEPS(3),
|
|
ACTIVITY_DATA(5),
|
|
HEART_RATE(9);
|
|
|
|
final int value;
|
|
|
|
EventCode(int value) {
|
|
this.value = value;
|
|
}
|
|
|
|
static EventCode fromInt(int i) {
|
|
for (EventCode code : values()){
|
|
if (code.value == i)
|
|
return code;
|
|
}
|
|
throw new RuntimeException("wrong event code: " + i);
|
|
}
|
|
}
|