remove un-necessary checks for SCAN_TIMEOUT_MAX

This commit is contained in:
Rohit Grover 2015-06-05 08:03:48 +01:00
parent 73a6be23d8
commit 0ff09c61c3

View file

@ -49,9 +49,6 @@ public:
if (_window > SCAN_WINDOW_MAX) {
_window = SCAN_WINDOW_MAX;
}
if (_timeout > SCAN_TIMEOUT_MAX) {
_timeout = SCAN_TIMEOUT_MAX;
}
}
ble_error_t setInterval(uint16_t newIntervalInMS) {
@ -75,12 +72,8 @@ public:
}
ble_error_t setTimeout(uint16_t newTimeout) {
if (newTimeout <= SCAN_TIMEOUT_MAX) {
_timeout = newTimeout;
return BLE_ERROR_NONE;
}
return BLE_ERROR_PARAM_OUT_OF_RANGE;
_timeout = newTimeout;
return BLE_ERROR_NONE;
}
void setActiveScanning(bool activeScanning) {