pm5conv timestamp
This commit is contained in:
parent
df77a0b33e
commit
8ba1ba125f
|
@ -15,6 +15,16 @@ function printNonEmpty {
|
|||
fi
|
||||
}
|
||||
|
||||
function printTimestamp {
|
||||
timestamp="0x$1"
|
||||
year="$(( ((timestamp & 0xFE000000) >> 25) + 2000 ))"
|
||||
day="$(( (timestamp & 0x01F00000) >> 21 ))"
|
||||
month="$(( (timestamp & 0x000F0000) >> 16 ))"
|
||||
hour="$(( (timestamp & 0x0000FF00) >> 8 ))"
|
||||
minute="$(( timestamp & 0x000000FF ))"
|
||||
printf "Date %d-%02d-%02d %02d:%02d\n" $year $month $day $hour $minute
|
||||
}
|
||||
|
||||
function printSplit {
|
||||
outputSplit="$($cmd -nopadding -fvar=offset=$1,splitNo=$2 $storage-Workout$3.layhex $storage 2> /dev/null)"
|
||||
status=$?
|
||||
|
@ -37,6 +47,7 @@ function printWorkout {
|
|||
status=$?
|
||||
if [ $status -eq 0 ]; then
|
||||
eval "$outputHeader"
|
||||
printTimestamp "$Timestamp"
|
||||
printNonEmpty "TotalDuration"
|
||||
printNonEmpty "TotalDistance"
|
||||
printNonEmpty "SplitSize"
|
||||
|
|
Loading…
Reference in New Issue
Block a user