//============================================================================= // 1msec timer interrupt hook void user_1ms_isr_type2(void) { (void)SignalCounter(SysTimerCnt); // Alarm counter SleeperMonitor(); // Need for Nxt and I2C device classes if (mNxt.getButtons() == Nxt::ENTR_ON && !mBluetooth.isConnected()) { mBluetooth.cancelWaitForConnection(); // Cancel Bluetooth connection process } }
void isBTconnected(notification_data* data) { Bluetooth bt = bluetooth_get_instance(); bool x= bt->isConnected(bt); sprintf(data->result_text,"%s",x?"is connected":"not connected"); }