Bug fix for Android (C variable name conflict).
This commit is contained in:
parent
a6cc776a0d
commit
6da0474e59
|
@ -326,7 +326,7 @@ func goOnDiscoverService(cid, cuuid *C.char, serv C.jobject) {
|
|||
}
|
||||
|
||||
//export goOnDiscoverCharacteristic
|
||||
func goOnDiscoverCharacteristic(cid, csuuid *C.char, serv C.jobject, ccuuid *C.char, char C.jobject) {
|
||||
func goOnDiscoverCharacteristic(cid, csuuid *C.char, serv C.jobject, ccuuid *C.char, characteristic C.jobject) {
|
||||
id := C.GoString(cid)
|
||||
suuid := C.GoString(csuuid)
|
||||
cuuid := C.GoString(ccuuid)
|
||||
|
@ -339,34 +339,34 @@ func goOnDiscoverCharacteristic(cid, csuuid *C.char, serv C.jobject, ccuuid *C.c
|
|||
service: serv,
|
||||
}
|
||||
|
||||
characteristic := Characteristic{
|
||||
ch := Characteristic{
|
||||
UUID: cuuid,
|
||||
characteristic: char,
|
||||
characteristic: characteristic,
|
||||
}
|
||||
|
||||
gBLE.events <- DiscoverCharacteristicEvent{
|
||||
Peripheral: peripheral,
|
||||
Service: service,
|
||||
Characteristic: characteristic,
|
||||
Characteristic: ch,
|
||||
Gatt: gatt.Characteristic{cuuid},
|
||||
}
|
||||
}
|
||||
|
||||
//export goOnCharacteristicChanged
|
||||
func goOnCharacteristicChanged(cid, ccuuid *C.char, char C.jobject, cvalue *C.char, length C.jint) {
|
||||
func goOnCharacteristicChanged(cid, ccuuid *C.char, characteristic C.jobject, cvalue *C.char, length C.jint) {
|
||||
id := C.GoString(cid)
|
||||
cuuid := C.GoString(ccuuid)
|
||||
|
||||
peripheral := gBLE.retrievePeripheral(id)
|
||||
|
||||
characteristic := Characteristic{
|
||||
ch := Characteristic{
|
||||
UUID: cuuid,
|
||||
characteristic: char,
|
||||
characteristic: characteristic,
|
||||
}
|
||||
|
||||
gBLE.events <- UpdateValueEvent{
|
||||
Peripheral: peripheral,
|
||||
Characteristic: characteristic,
|
||||
Characteristic: ch,
|
||||
Data: C.GoBytes(unsafe.Pointer(cvalue), length),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user