disabled BLE to use radio
Dependencies: BLE_API nRF51822 mbed-dev-bin
Diff: source/drivers/MicroBitLightSensor.cpp
- Revision:
- 8:ec4465853952
- Parent:
- 1:8aa5cdb4ab67
diff -r a4042bbb7f8b -r ec4465853952 source/drivers/MicroBitLightSensor.cpp --- a/source/drivers/MicroBitLightSensor.cpp Thu Apr 07 23:39:33 2016 +0100 +++ b/source/drivers/MicroBitLightSensor.cpp Thu Apr 07 23:39:34 2016 +0100 @@ -87,6 +87,9 @@ { this->chan = 0; + for(int i = 0; i < MICROBIT_LIGHT_SENSOR_CHAN_NUM; i++) + results[i] = 0; + if (EventModel::defaultEventBus) EventModel::defaultEventBus->listen(MICROBIT_ID_DISPLAY, MICROBIT_DISPLAY_EVT_LIGHT_SENSE, this, &MicroBitLightSensor::startSensing, MESSAGE_BUS_LISTENER_IMMEDIATE); @@ -174,4 +177,4 @@ { if (EventModel::defaultEventBus) EventModel::defaultEventBus->ignore(MICROBIT_ID_DISPLAY, MICROBIT_DISPLAY_EVT_LIGHT_SENSE, this, &MicroBitLightSensor::startSensing); -} +} \ No newline at end of file