diff --git a/cmd/itctl/firmware/upgrade.go b/cmd/itctl/firmware/upgrade.go index 18f5372..7df69dd 100644 --- a/cmd/itctl/firmware/upgrade.go +++ b/cmd/itctl/firmware/upgrade.go @@ -73,7 +73,7 @@ var upgradeCmd = &cobra.Command{ // Set amount of bytes received in progress bar bar.SetCurrent(event.Received) // If transfer finished, break - if event.Received == event.Total { + if event.Sent == event.Total { break } } diff --git a/internal/types/types.go b/internal/types/types.go index cf6a47f..98ea75b 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -65,6 +65,7 @@ type ReqDataNotify struct { type DFUProgress struct { Received int64 `mapstructure:"recvd"` Total int64 `mapstructure:"total"` + Sent int64 `mapstructure:"sent"` } type MotionValues struct {