From 337721a8b1dda4338466838c20fa1ff558476073 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 19 Dec 2019 23:31:35 +0100 Subject: [PATCH] zapit: align to ddt Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/32c2ff6b54618734b21327c5e937eaae7d18a40b Author: vanhofen Date: 2019-12-19 (Thu, 19 Dec 2019) Origin message was: ------------------ - zapit: align to ddt --- src/zapit/src/frontend.cpp | 4 +--- src/zapit/src/zapit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 948e65482..c28aefc40 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -2337,9 +2337,7 @@ double calcAzimuth(double SatLon, double SiteLat, double SiteLon, int Height_ove double calcDeclination(double SiteLat, double Azimuth, double Elevation) { - return Deg(ASIN(SIN(Radians(Elevation)) * SIN(Radians(SiteLat)) + COS(Radians(Elevation)) * COS(Radians(SiteLat)) + COS(Radians(Azimuth)) - ) - ); + return Deg(ASIN(SIN(Radians(Elevation)) * SIN(Radians(SiteLat)) + COS(Radians(Elevation)) * COS(Radians(SiteLat)) + COS(Radians(Azimuth)))); } double calcSatHourangle(double Azimuth, double Elevation, double Declination, double Lat) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 0831cb212..2a21f9c31 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -857,7 +857,7 @@ void CZapit::SetPidVolume(t_channel_id channel_id, int pid, int percent) if (!channel_id) channel_id = live_channel_id; - if (!pid && (channel_id == live_channel_id) && current_channel) + if ((pid < 0) && (channel_id == live_channel_id) && current_channel) pid = current_channel->getAudioPid(); OpenThreads::ScopedLock m_lock(vol_map_mutex); INFO("############################### channel %" PRIx64 " pid %x map size %d percent %d", channel_id, pid, (int)vol_map.size(), percent); @@ -879,7 +879,7 @@ int CZapit::GetPidVolume(t_channel_id channel_id, int pid, bool ac3) if (!channel_id) channel_id = live_channel_id; - if (!pid && (channel_id == live_channel_id) && current_channel) + if ((pid < 0) && (channel_id == live_channel_id) && current_channel) pid = current_channel->getAudioPid(); OpenThreads::ScopedLock m_lock(vol_map_mutex);