X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/e32107a7fe79ce34f3bdf860410a6d5455efdca7..2b43b1c28e9ced6c475904604df1c99b78cd8a71:/bin/weather-filter?ds=sidebyside diff --git a/bin/weather-filter b/bin/weather-filter index 1fc798f..84c2265 100755 --- a/bin/weather-filter +++ b/bin/weather-filter @@ -42,6 +42,10 @@ function filter_data(dataset,width) width = 7 end + if #dataset <= width then + return dataset + end + local result = {} local window_spread = math.floor(width/2)