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.
|
// 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
|
// It allows you to control the color of the built-in NeoPixel LEDS while they animate
|
||||||
// in a circular pattern.
|
// in a circular pattern.
|
||||||
//
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -67,7 +66,7 @@ func main() {
|
||||||
Handle: &ledColorCharacteristic,
|
Handle: &ledColorCharacteristic,
|
||||||
UUID: bluetooth.NewUUID(charUUID),
|
UUID: bluetooth.NewUUID(charUUID),
|
||||||
Value: ledColor[:],
|
Value: ledColor[:],
|
||||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission,
|
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission | bluetooth.CharacteristicWriteWithoutResponsePermission,
|
||||||
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
||||||
if offset != 0 || len(value) != 3 {
|
if offset != 0 || len(value) != 3 {
|
||||||
return
|
return
|
||||||
|
|
|
@ -36,7 +36,7 @@ func main() {
|
||||||
Handle: &ledColorCharacteristic,
|
Handle: &ledColorCharacteristic,
|
||||||
UUID: bluetooth.NewUUID(charUUID),
|
UUID: bluetooth.NewUUID(charUUID),
|
||||||
Value: ledColor[:],
|
Value: ledColor[:],
|
||||||
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission,
|
Flags: bluetooth.CharacteristicReadPermission | bluetooth.CharacteristicWritePermission | bluetooth.CharacteristicWriteWithoutResponsePermission,
|
||||||
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
WriteEvent: func(client bluetooth.Connection, offset int, value []byte) {
|
||||||
if offset != 0 || len(value) != 3 {
|
if offset != 0 || len(value) != 3 {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue