Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set BAT_INDEX as uint16 in example code #64

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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