File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -321,17 +321,28 @@ uint8_t BME280::checkSampleValue(uint8_t userValue)
321321{
322322 switch (userValue)
323323 {
324- case (0 ): break ; // Valid
325- case (1 ): break ; // Valid
326- case (2 ): break ; // Valid
327- case (4 ): break ; // Valid
328- case (8 ): break ; // Valid
329- case (16 ): break ; // Valid
324+ case (0 ):
325+ return 0 ;
326+ break ; // Valid
327+ case (1 ):
328+ return 1 ;
329+ break ; // Valid
330+ case (2 ):
331+ return 2 ;
332+ break ; // Valid
333+ case (4 ):
334+ return 3 ;
335+ break ; // Valid
336+ case (8 ):
337+ return 4 ;
338+ break ; // Valid
339+ case (16 ):
340+ return 5 ;
341+ break ; // Valid
330342 default :
331- userValue = 1 ; // Default to 1x
343+ return 1 ; // Default to 1x
332344 break ; // Good
333345 }
334- return (userValue);
335346}
336347
337348// Set the global setting for the I2C address we want to communicate with
You can’t perform that action at this time.
0 commit comments