Include WriteWithoutResponse permission, for examples, where Write exists
This commit is contained in:
parent
d9490f73ea
commit
4da7f58124
2 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
|||
// This example is intended to be used with the Adafruit Circuitplay Bluefruit board.
|
||||
// It allows you to control the color of the built-in NeoPixel LEDS while they animate
|
||||
// in a circular pattern.
|
||||
//
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -67,7 +66,7 @@ func main() {
|
|||
Handle: &ledColorCharacteristic,
|
||||
UUID: bluetooth.NewUUID(charUUID),
|
||||
Value: ledColor[:],
|
||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission,
|
||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission | bluetooth.CharacteristicWriteWithoutResponsePermission,
|
||||
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
||||
if offset != 0 || len(value) != 3 {
|
||||
return
|
||||
|
|
|
@ -36,7 +36,7 @@ func main() {
|
|||
Handle: &ledColorCharacteristic,
|
||||
UUID: bluetooth.NewUUID(charUUID),
|
||||
Value: ledColor[:],
|
||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission,
|
||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission | bluetooth.CharacteristicWriteWithoutResponsePermission,
|
||||
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
||||
if offset != 0 || len(value) != 3 {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue