diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-29 21:33:57 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-29 21:33:57 +0200 |
commit | fd99a7ea34e627482261b22eb17f78d43f26428c (patch) | |
tree | a4221853b175bc8d18436f0c73e2def33235aa55 | |
parent | 1ff55d4c9acb9e1688bf76f12ae5ae26027ce113 (diff) | |
download | gmrf-fd99a7ea34e627482261b22eb17f78d43f26428c.tar gmrf-fd99a7ea34e627482261b22eb17f78d43f26428c.zip |
packet loss: fix phase
-rw-r--r-- | mmss/network.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mmss/network.cpp b/mmss/network.cpp index ae1dc3c..9eb3b3a 100644 --- a/mmss/network.cpp +++ b/mmss/network.cpp @@ -38,10 +38,10 @@ float network_t::get_etx() const { if (etx_min == etx_max) return etx_min; - float val = float(std::sin(2*M_PI * (mmss->now()/1000.0 - phase)/period)); + float val = float(std::sin(2*M_PI * (mmss->now()/1000.0 + phase)/period)); float diff = etx_max - etx_min; - mmss->logf(LOG_DEBUG, "ETX: %.3f", etx_min + diff * (val+1)/2); + mmss->logf(LOG_DEBUG, "ETX for `%s' is %.3f now", name.c_str(), etx_min + diff * (val+1)/2); return etx_min + diff * (val+1)/2; } |