robotastic / trunk-recorder

Records calls from a Trunked Radio System (P25 & SmartNet)
GNU General Public License v3.0
827 stars 191 forks source link

Adjust integer config values to double #876

Closed taclane closed 7 months ago

taclane commented 7 months ago

The value for squelch_db was previously read from the config file as a double, and is later used as a double during recorder setup. Updating the default value would restore this behavior, and avoid truncating downward to an integer.

The value for callTimeout has previously been read from the config file as an integer, but the json library is now truncating the value instead of rounding. Reports such as #875, and similar discussions on the discord, seem to indicate that users have been setting decimal values for this under one second, and the fact that it is now truncating down to 0 is causing multiple unexpected issues.

Much like other call-shaping parameters (minDuration, maxDuration, and minTransmissionDuration), callTimeout should also allow decimal values. Adjusting the type in the config struct would correct this.

robotastic commented 7 months ago

Agreed - the difference between rounding and truncating has seemed to cause some real issues. This is a good approach to address that.