@@ -672,7 +672,6 @@ uint8_t SparkFun_Bio_Sensor_Hub::accelControl(uint8_t accelSwitch) {
672
672
// Write Byte : outputType (Parameter values in OUTPUT_MODE_WRITE_BYTE)
673
673
uint8_t SparkFun_Bio_Sensor_Hub::setOutputMode (uint8_t outputType) {
674
674
675
- // if (outputType < PAUSE || outputType > SENSOR_ALGO_COUNTER) // Bytes between 0x00 and 0x07
676
675
if ( outputType > SENSOR_ALGO_COUNTER ) // Bytes between 0x00 and 0x07
677
676
return INCORR_PARAM;
678
677
@@ -693,9 +692,6 @@ uint8_t SparkFun_Bio_Sensor_Hub::setOutputMode(uint8_t outputType) {
693
692
// (begin).
694
693
uint8_t SparkFun_Bio_Sensor_Hub::setFifoThreshold (uint8_t intThresh) {
695
694
696
- // if(( intThresh < 0 )||( intThresh > 255 ))
697
- // return INCORR_PARAM;
698
-
699
695
// Checks that there was succesful communcation, not that the threshold was
700
696
// set correctly.
701
697
uint8_t statusByte = writeByte (OUTPUT_MODE, WRITE_SET_THRESHOLD, intThresh);
@@ -849,7 +845,6 @@ uint8_t* SparkFun_Bio_Sensor_Hub::dumpRegisterAccelerometer(uint8_t numReg, uint
849
845
// 100 percent.
850
846
uint8_t SparkFun_Bio_Sensor_Hub::setAlgoRange (uint8_t perc) {
851
847
852
- // if( perc < 0 || perc > 100)
853
848
if ( perc > 100 )
854
849
return INCORR_PARAM;
855
850
@@ -868,7 +863,6 @@ uint8_t SparkFun_Bio_Sensor_Hub::setAlgoRange(uint8_t perc) {
868
863
// It takes a paramater of zero to 100 percent.
869
864
uint8_t SparkFun_Bio_Sensor_Hub::setAlgoStepSize (uint8_t step) {
870
865
871
- // if( step < 0 || step > 100)
872
866
if ( step > 100 )
873
867
return INCORR_PARAM;
874
868
@@ -886,7 +880,6 @@ uint8_t SparkFun_Bio_Sensor_Hub::setAlgoStepSize(uint8_t step) {
886
880
// This function changes the sensitivity of the AGC algorithm.
887
881
uint8_t SparkFun_Bio_Sensor_Hub::setAlgoSensitivity (uint8_t sense) {
888
882
889
- // if( sense < 0 || sense > 100 )
890
883
if ( sense > 100 )
891
884
return INCORR_PARAM;
892
885
@@ -905,9 +898,6 @@ uint8_t SparkFun_Bio_Sensor_Hub::setAlgoSensitivity(uint8_t sense) {
905
898
// It takes a paramater of zero to 255.
906
899
uint8_t SparkFun_Bio_Sensor_Hub::setAlgoSamples (uint8_t avg) {
907
900
908
- // if( avg < 0 || avg > 255 )
909
- // return INCORR_PARAM;
910
-
911
901
// Successful communication or no?
912
902
uint8_t statusByte = writeByte (CHANGE_ALGORITHM_CONFIG, SET_AVG_SAMPLES, AGC_SENSITIVITY_ID, avg);
913
903
if ( statusByte != SUCCESS )
0 commit comments