Closed davrocks closed 8 years ago
Correction: sorry I added an f on accident but the other problem remains. New error Code:
C:\Users\User\Downloads\blidino-master(2)\blidino-master\nRF51822-BLEMIDI\nRF51822-BLEMIDI.ino: In function 'void setup()':
nRF51822-BLEMIDI:268: error: invalid conversion from 'void (_)(Gap::Handle_t, Gap::DisconnectionReasont) {aka void ()(short unsigned int, Gap::DisconnectionReasont)}' to 'void ()(const Gap::DisconnectionCallbackParamst)' [-fpermissive]
ble.onDisconnection(disconnectionCallback);
^
In file included from C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBL_nRF51822/ble-master/ble/CallChainOfFunctionPointersWithContext.h:20:0,
from C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBL_nRF51822/ble-master/ble/Gap.h:25,
from C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBL_nRF51822/ble-master/ble/BLE.h:21,
from C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7\cores\RBL_nRF51822/BLE_API.h:5,
from C:\Users\User\Downloads\blidino-master(2)\blidino-master\nRF51822-BLEMIDI\nRF51822-BLEMIDI.ino:24:
C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBLnRF51822/ble-master/ble/FunctionPointerWithContext.h:37:5: error: initializing argument 1 of 'FunctionPointerWithContext
FunctionPointerWithContext(void (*function)(ContextType context) = NULL) :
^
Using library USB_Host_Shield_2.0-master at version 1.2.1 in folder: C:\Users\User\Documents\Arduino\libraries\USB_Host_Shield_2.0-master Using library SPI_Master in folder: C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7\libraries\SPIMaster (legacy) exit status 1 invalid conversion from 'void ()(Gap::Handle_t, Gap::DisconnectionReasont) {aka void ()(short unsigned int, Gap::DisconnectionReasont)}' to 'void ()(const Gap::DisconnectionCallbackParamst)' [-fpermissive]
Not the first time this happened. I'd assume there's been a few changes to the RedbearLab API again 😦 I'll look into a fix sometime next week.
Thanks :smile: you're awesome.
There's a PR in place to fix this. Came across another issue with the USB Host Shield Library. If you planned on using that one, too, please wait till https://github.com/felis/USB_Host_Shield_2.0/pull/258 gets merged on their upstream.
I have been unable to compile the sketch, and apparently there is some problem with the disconnection and disconnectioncallback code? (idk). Here is the error anyway. (I checked verbose output but deleted most of the white text) Thank you so much!
Arduino: 1.6.9 (Windows 10), Board: "RBL nRF51822(V1.5 32KB)"
nRF51822-BLEMIDI:218: error: 'f' does not name a type
f
^
C:\Users\User\Downloads\blidino-master(2)\blidino-master\nRF51822-BLEMIDI\nRF51822-BLEMIDI.ino: In function 'void setup()':
nRF51822-BLEMIDI:268: error: invalid conversion from 'void (_)(Gap::Handle_t, Gap::DisconnectionReasont) {aka void ()(short unsigned int, Gap::DisconnectionReasont)}' to 'void ()(const Gap::DisconnectionCallbackParamst)' [-fpermissive]
ble.onDisconnection(disconnectionCallback);
In file included from C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBL_nRF51822/ble-master/ble/CallChainOfFunctionPointersWithContext.h:20:0,
C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7/cores/RBLnRF51822/ble-master/ble/FunctionPointerWithContext.h:37:5: error: initializing argument 1 of 'FunctionPointerWithContext::FunctionPointerWithContext(void ( )(ContextType)) [with ContextType = const Gap::DisconnectionCallbackParamst]' [-fpermissive]
nRF51822-BLEMIDI:269: error: 'connectionCallback' was not declared in this scope
ble.onConnection(connectionCallback);
Using library USB_Host_Shield_2.0-master at version 1.2.1 in folder: C:\Users\User\Documents\Arduino\libraries\USB_Host_Shield_2.0-master Using library SPI_Master in folder: C:\Users\User\AppData\Local\Arduino15\packages\RedBearLab\hardware\nRF51822\1.0.7\libraries\SPI_Master (legacy) exit status 1 'f' does not name a type