mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-09 14:48:24 +02:00
3a58314db6
- communication protocols - device support implementation - download FIT file storage Features: - basic connectivity: time sync, battery status, HW/FW version info - real-time activity tracking - fitness data sync - find the device, find the phone - factory reset Features implemented but not working: - notifications: fully implemented, seem to communicate correctly, but not shown on watch Features implemented partially (not expected to work now): - weather information (and in future possibly weather alerts) - music info - firmware update: only the initial file upload implemented, not used Things to improve/change: - Device name hardcoded in `VivomoveHrCoordinator.getSupportedType`, service UUIDs not available - Download FIT file storage: Should be store (and offer the user to export?) the FIT data forever? - Obviously, various code improvements, cleanup, etc.
28 lines
988 B
Java
28 lines
988 B
Java
package nodomain.freeyourgadget.gadgetbridge.service.devices.vivomovehr.messages;
|
|
|
|
public class FitDataResponseMessage {
|
|
public final int requestID;
|
|
public final int status;
|
|
public final int fitResponse;
|
|
|
|
public FitDataResponseMessage(int requestID, int status, int fitResponse) {
|
|
this.requestID = requestID;
|
|
this.status = status;
|
|
this.fitResponse = fitResponse;
|
|
}
|
|
|
|
public static FitDataResponseMessage parsePacket(byte[] packet) {
|
|
final MessageReader reader = new MessageReader(packet, 4);
|
|
final int requestID = reader.readShort();
|
|
final int status = reader.readByte();
|
|
final int fitResponse = reader.readByte();
|
|
|
|
return new FitDataResponseMessage(requestID, status, fitResponse);
|
|
}
|
|
|
|
public static final int RESPONSE_APPLIED = 0;
|
|
public static final int RESPONSE_NO_DEFINITION = 1;
|
|
public static final int RESPONSE_MISMATCH = 2;
|
|
public static final int RESPONSE_NOT_READY = 3;
|
|
}
|