Skip to content

Commit

Permalink
Set BAT_INDEX as uint16 in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
der-eismann authored and spali committed Oct 21, 2024
1 parent 5494bd8 commit 426e493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rscp/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func validateRequests(messages []Message) error {
//
// CreateRequest(INFO_REQ_UTC_TIME)
// CreateRequest(EMS_REQ_SET_ERROR_BUZZER_ENABLED, true)
// CreateRequest(BAT_REQ_DATA, BAT_INDEX, 0, BAT_REQ_DEVICE_STATE, BAT_REQ_RSOC, BAT_REQ_STATUS_CODE)
// CreateRequest(BAT_REQ_DATA, BAT_INDEX, uint16(0), BAT_REQ_DEVICE_STATE, BAT_REQ_RSOC, BAT_REQ_STATUS_CODE)
func CreateRequest(values ...interface{}) (msg *Message, err error) {
if msg, err = readRequestSlice(values); err != nil {
return nil, err
Expand All @@ -45,7 +45,7 @@ func CreateRequest(values ...interface{}) (msg *Message, err error) {
//
// CreateRequests([]interface{}{INFO_REQ_UTC_TIME})
// CreateRequests([]interface{}{EMS_REQ_SET_ERROR_BUZZER_ENABLED, true})
// CreateRequests([]interface{}{BAT_REQ_DATA, BAT_INDEX, 0, BAT_REQ_DEVICE_STATE, BAT_REQ_RSOC, BAT_REQ_STATUS_CODE})
// CreateRequests([]interface{}{BAT_REQ_DATA, BAT_INDEX, uint16(0), BAT_REQ_DEVICE_STATE, BAT_REQ_RSOC, BAT_REQ_STATUS_CODE})
func CreateRequests(values ...[]interface{}) ([]Message, error) {
if len(values) == 0 {
return nil, ErrNoArguments
Expand Down

0 comments on commit 426e493

Please sign in to comment.