Use sent bytes to check if transfer complete
This commit is contained in:
parent
4d35912466
commit
44dc5f8e47
@ -73,7 +73,7 @@ var upgradeCmd = &cobra.Command{
|
|||||||
// Set amount of bytes received in progress bar
|
// Set amount of bytes received in progress bar
|
||||||
bar.SetCurrent(event.Received)
|
bar.SetCurrent(event.Received)
|
||||||
// If transfer finished, break
|
// If transfer finished, break
|
||||||
if event.Received == event.Total {
|
if event.Sent == event.Total {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ type ReqDataNotify struct {
|
|||||||
type DFUProgress struct {
|
type DFUProgress struct {
|
||||||
Received int64 `mapstructure:"recvd"`
|
Received int64 `mapstructure:"recvd"`
|
||||||
Total int64 `mapstructure:"total"`
|
Total int64 `mapstructure:"total"`
|
||||||
|
Sent int64 `mapstructure:"sent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MotionValues struct {
|
type MotionValues struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user