@@ -120,23 +120,10 @@ bool BLEClientHidAdafruit::discover(uint16_t conn_handle)
120
120
_conn_hdl = BLE_CONN_HANDLE_INVALID; // make as invalid until we found all chars
121
121
122
122
// Discover all characteristics
123
- Bluefruit.Discovery .discoverCharacteristic (conn_handle, _protcol_mode, _kbd_boot_input, _kbd_boot_output, _hid_info, _hid_control, _gpd_report);
123
+ Bluefruit.Discovery .discoverCharacteristic (conn_handle, _protcol_mode, _kbd_boot_input, _kbd_boot_output, _mse_boot_input, _hid_info, _hid_control, _gpd_report);
124
124
125
- Serial.print (" _protcol_mode.discovered(): " );
126
- Serial.println (_protcol_mode.discovered ());
127
-
128
- Serial.print (" _hid_info.discovered(): " );
129
- Serial.println (_hid_info.discovered ());
130
-
131
- Serial.print (" _hid_control.discovered(): " );
132
- Serial.println (_hid_control.discovered ());
133
-
134
- Serial.print (" _gpd_report.discovered(): " );
135
- Serial.println (_gpd_report.discovered ());
136
-
137
-
138
- VERIFY ( /* _protcol_mode.discovered() &&*/ _hid_info.discovered () && _hid_control.discovered () );
139
- // VERIFY ( keyboardPresent() || mousePresent() || gamepadPresent() );
125
+ VERIFY ( _hid_info.discovered () && _hid_control.discovered () );
126
+ VERIFY (keyboardPresent () || mousePresent () || gamepadPresent ());
140
127
141
128
_conn_hdl = conn_handle;
142
129
return true ;
@@ -169,7 +156,7 @@ bool BLEClientHidAdafruit::setBootMode(bool boot)
169
156
*------------------------------------------------------------------*/
170
157
bool BLEClientHidAdafruit::keyboardPresent (void )
171
158
{
172
- return _kbd_boot_input.discovered () && _kbd_boot_output.discovered ();
159
+ return _kbd_boot_input.discovered () && _kbd_boot_output.discovered () && _protcol_mode. discovered () ;
173
160
}
174
161
175
162
bool BLEClientHidAdafruit::enableKeyboard (void )
@@ -200,7 +187,7 @@ void BLEClientHidAdafruit::getKeyboardReport(hid_keyboard_report_t* report)
200
187
*------------------------------------------------------------------*/
201
188
bool BLEClientHidAdafruit::mousePresent (void )
202
189
{
203
- return _mse_boot_input.discovered ();
190
+ return _mse_boot_input.discovered () && _protcol_mode. discovered () ;
204
191
}
205
192
206
193
bool BLEClientHidAdafruit::enableMouse (void )
0 commit comments