mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 18:45:49 +01:00
Amazfit Bip: fix fetching logs from device via debug menu
This commit is contained in:
parent
9d0de4d455
commit
1996184d69
@ -61,7 +61,7 @@ public class AmazfitBipFetchLogsOperation extends AbstractFetchOperation {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd-hhmmss", Locale.US);
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd-HHmmss", Locale.US);
|
||||||
String filename = "amazfitbip_" + dateFormat.format(new Date()) + ".log";
|
String filename = "amazfitbip_" + dateFormat.format(new Date()) + ".log";
|
||||||
|
|
||||||
File outputFile = new File(dir, filename );
|
File outputFile = new File(dir, filename );
|
||||||
@ -121,7 +121,7 @@ public class AmazfitBipFetchLogsOperation extends AbstractFetchOperation {
|
|||||||
@Override
|
@Override
|
||||||
protected void bufferActivityData(@NonNull byte[] value) {
|
protected void bufferActivityData(@NonNull byte[] value) {
|
||||||
try {
|
try {
|
||||||
logOutputStream.write(value, 1, value.length);
|
logOutputStream.write(value, 1, value.length - 1);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.warn("could not write to output stream", e);
|
LOG.warn("could not write to output stream", e);
|
||||||
handleActivityFetchFinish(false);
|
handleActivityFetchFinish(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user