From 5c74cab289fa95fa3a43bcdd3a0cf76d9a1d98e0 Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Sun, 18 Feb 2018 08:47:28 +0100 Subject: [PATCH] ble: correct spelling error in function name Signed-off-by: Ron Evans --- platforms/ble/ble_client_adaptor.go | 24 ++++++++++++------------ platforms/ble/helpers_test.go | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/platforms/ble/ble_client_adaptor.go b/platforms/ble/ble_client_adaptor.go index c95775a7..34610fa9 100644 --- a/platforms/ble/ble_client_adaptor.go +++ b/platforms/ble/ble_client_adaptor.go @@ -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 @@ -42,19 +42,19 @@ type ClientAdaptor struct { client blelib.Client profile *blelib.Profile - connected bool - ready chan struct{} - withoutReponses bool + connected bool + ready chan struct{} + withoutResponses bool } // NewClientAdaptor returns a new ClientAdaptor given an address or peripheral name func NewClientAdaptor(address string) *ClientAdaptor { return &ClientAdaptor{ - name: gobot.DefaultName("BLEClient"), - address: address, - DeviceName: "default", - connected: false, - withoutReponses: false, + name: gobot.DefaultName("BLEClient"), + address: address, + DeviceName: "default", + connected: 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 diff --git a/platforms/ble/helpers_test.go b/platforms/ble/helpers_test.go index 7820d44c..7df468b7 100644 --- a/platforms/ble/helpers_test.go +++ b/platforms/ble/helpers_test.go @@ -5,23 +5,23 @@ import "sync" var _ BLEConnector = (*bleTestClientAdaptor)(nil) type bleTestClientAdaptor struct { - name string - address string - mtx sync.Mutex - withoutReponses bool + name string + address string + mtx sync.Mutex + withoutResponses bool testReadCharacteristic func(string) ([]byte, error) testWriteCharacteristic func(string, []byte) error } -func (t *bleTestClientAdaptor) Connect() (err error) { return } -func (t *bleTestClientAdaptor) Reconnect() (err error) { return } -func (t *bleTestClientAdaptor) Disconnect() (err error) { return } -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) Connect() (err error) { return } +func (t *bleTestClientAdaptor) Reconnect() (err error) { return } +func (t *bleTestClientAdaptor) Disconnect() (err error) { return } +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) WithoutResponses(use bool) { t.withoutResponses = use } func (t *bleTestClientAdaptor) ReadCharacteristic(cUUID string) (data []byte, err error) { t.mtx.Lock()