Skip to content

Commit 08674b3

Browse files
committed
refactor: codacy error report in sound meter
1 parent 0d7d8bf commit 08674b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/io/pslab/fragment/SoundMeterDataFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ private void startProcessing() {
341341
/*
342342
* update the moving average window
343343
*/
344-
if( !(movingAvgWindow.size() < movingAvgWindowSize) ) {
344+
if ((movingAvgWindow.size() >= movingAvgWindowSize)) {
345345
rmsSum -= movingAvgWindow.removeFirst();
346346
}
347347
movingAvgWindow.addLast(rmsamp);

0 commit comments

Comments
 (0)