catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
327 stars 81 forks source link

WEB: New progress bar & dB with DVB adapters #918

Closed lars18th closed 2 years ago

lars18th commented 2 years ago

This PR fixes and improves #911. It's a teamwork of @kellerman and me.

The Progress Bar has changed in the UI with new format. Futhermore, it prints the real dB value if the adapter provides it. Implemented the get of the dB value for DVB adapters that report in this scale.

lars18th commented 2 years ago

Supersedes #914.

catalinii commented 2 years ago

I would suggest using value 0 instead of 65535 for situation where the signal cannot be read. By default the adapter vlues are all initialized to 0, and there are other cases such as satip adapters, so the ad->db value is not set to 65535. In that case the code may not work properly.

lars18th commented 2 years ago

I would suggest using value 0 instead of 65535 for situation where the signal cannot be read. By default the adapter vlues are all initialized to 0, and there are other cases such as satip adapters, so the ad->db value is not set to 65535. In that case the code may not work properly.

This is false. I considered this case. All tuners are initialized with the 65535 value for the dB. See the line 281 in the int init_hw() function. 😉

Futhermore, a 0.0 dB value could not be considered "no value". Because the tuner can report 0 dB if no signal is locked. So we can't assume that a 0 value is "no value". We need to distinguish between 0 and NO_DB_REPORTING. So for the last I prefer to use 65535 (MAX_DB). You agree?