Skip to content

Commit

Permalink
Saic: improve response handling (#12993)
Browse files Browse the repository at this point in the history
  • Loading branch information
kscholty authored Mar 24, 2024
1 parent 64f6ede commit 55aa5f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/saic/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (v *Provider) Soc() (float64, error) {

val := res.ChrgMgmtData.BmsPackSOCDsp
if val > 1000 {
v.status.Reset()
//v.status.Reset()
return float64(val), fmt.Errorf("invalid raw soc value: %d: %w", val, api.ErrMustRetry)
}

Expand Down
1 change: 1 addition & 0 deletions vehicle/saic/requests/sendRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func CreateRequest(
return nil, err
}

Decorate(req)
req.Header.Set("app-send-date", strconv.FormatInt(appSendDate, 10))
req.Header.Set("original-content-type", contentType)

Expand Down

0 comments on commit 55aa5f5

Please sign in to comment.