ble: correct spelling error in function name
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
parent
8e6391105d
commit
5c74cab289
|
@ -28,7 +28,7 @@ type BLEConnector interface {
|
|||
ReadCharacteristic(string) ([]byte, error)
|
||||
WriteCharacteristic(string, []byte) error
|
||||
Subscribe(string, func([]byte, error)) error
|
||||
WithoutReponses(bool)
|
||||
WithoutResponses(bool)
|
||||
}
|
||||
|
||||
// ClientAdaptor represents a Client Connection to a BLE Peripheral
|
||||
|
@ -44,7 +44,7 @@ type ClientAdaptor struct {
|
|||
|
||||
connected bool
|
||||
ready chan struct{}
|
||||
withoutReponses bool
|
||||
withoutResponses bool
|
||||
}
|
||||
|
||||
// NewClientAdaptor returns a new ClientAdaptor given an address or peripheral name
|
||||
|
@ -54,7 +54,7 @@ func NewClientAdaptor(address string) *ClientAdaptor {
|
|||
address: address,
|
||||
DeviceName: "default",
|
||||
connected: false,
|
||||
withoutReponses: false,
|
||||
withoutResponses: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,9 @@ func (b *ClientAdaptor) SetName(n string) { b.name = n }
|
|||
// Address returns the Bluetooth LE address for the adaptor
|
||||
func (b *ClientAdaptor) Address() string { return b.address }
|
||||
|
||||
// WithoutReponses sets if the adaptor should expect responses after
|
||||
// WithoutResponses sets if the adaptor should expect responses after
|
||||
// writing characteristics for this device
|
||||
func (b *ClientAdaptor) WithoutReponses(use bool) { b.withoutReponses = use }
|
||||
func (b *ClientAdaptor) WithoutResponses(use bool) { b.withoutResponses = use }
|
||||
|
||||
// Connect initiates a connection to the BLE peripheral. Returns true on successful connection.
|
||||
func (b *ClientAdaptor) Connect() (err error) {
|
||||
|
@ -152,7 +152,7 @@ func (b *ClientAdaptor) WriteCharacteristic(cUUID string, data []byte) (err erro
|
|||
uuid, _ := blelib.Parse(cUUID)
|
||||
|
||||
if u := b.profile.Find(blelib.NewCharacteristic(uuid)); u != nil {
|
||||
err = b.client.WriteCharacteristic(u.(*blelib.Characteristic), data, b.withoutReponses)
|
||||
err = b.client.WriteCharacteristic(u.(*blelib.Characteristic), data, b.withoutResponses)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
@ -8,7 +8,7 @@ type bleTestClientAdaptor struct {
|
|||
name string
|
||||
address string
|
||||
mtx sync.Mutex
|
||||
withoutReponses bool
|
||||
withoutResponses bool
|
||||
|
||||
testReadCharacteristic func(string) ([]byte, error)
|
||||
testWriteCharacteristic func(string, []byte) error
|
||||
|
@ -21,7 +21,7 @@ func (t *bleTestClientAdaptor) Finalize() (err error) { return }
|
|||
func (t *bleTestClientAdaptor) Name() string { return t.name }
|
||||
func (t *bleTestClientAdaptor) SetName(n string) { t.name = n }
|
||||
func (t *bleTestClientAdaptor) Address() string { return t.address }
|
||||
func (t *bleTestClientAdaptor) WithoutReponses(use bool) { t.withoutReponses = use }
|
||||
func (t *bleTestClientAdaptor) WithoutResponses(use bool) { t.withoutResponses = use }
|
||||
|
||||
func (t *bleTestClientAdaptor) ReadCharacteristic(cUUID string) (data []byte, err error) {
|
||||
t.mtx.Lock()
|
||||
|
|
Loading…
Reference in New Issue