|
@ -484,17 +484,22 @@ sensor_magnitude_t::sensor_magnitude_t(unsigned char slot, unsigned char index_l |
|
|
switch (type) { |
|
|
switch (type) { |
|
|
case MAGNITUDE_ENERGY: |
|
|
case MAGNITUDE_ENERGY: |
|
|
filter = new LastFilter(); |
|
|
filter = new LastFilter(); |
|
|
|
|
|
break; |
|
|
case MAGNITUDE_ENERGY_DELTA: |
|
|
case MAGNITUDE_ENERGY_DELTA: |
|
|
filter = new SumFilter(); |
|
|
filter = new SumFilter(); |
|
|
|
|
|
break; |
|
|
case MAGNITUDE_DIGITAL: |
|
|
case MAGNITUDE_DIGITAL: |
|
|
filter = new MaxFilter(); |
|
|
filter = new MaxFilter(); |
|
|
|
|
|
break; |
|
|
// For geiger counting moving average filter is the most appropriate if needed at all.
|
|
|
// For geiger counting moving average filter is the most appropriate if needed at all.
|
|
|
case MAGNITUDE_COUNT: |
|
|
case MAGNITUDE_COUNT: |
|
|
case MAGNITUDE_GEIGER_CPM: |
|
|
case MAGNITUDE_GEIGER_CPM: |
|
|
case MAGNITUDE_GEIGER_SIEVERT: |
|
|
case MAGNITUDE_GEIGER_SIEVERT: |
|
|
filter = new MovingAverageFilter(); |
|
|
filter = new MovingAverageFilter(); |
|
|
|
|
|
break; |
|
|
default: |
|
|
default: |
|
|
filter = new MedianFilter(); |
|
|
filter = new MedianFilter(); |
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
filter->resize(_sensor_report_every); |
|
|
filter->resize(_sensor_report_every); |
|
|