summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal.cpp')
-rw-r--r--signal-composer-binding/signal.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/signal-composer-binding/signal.cpp b/signal-composer-binding/signal.cpp
index ecba162..577d94c 100644
--- a/signal-composer-binding/signal.cpp
+++ b/signal-composer-binding/signal.cpp
@@ -485,14 +485,12 @@ double Signal::maximum(int seconds) const
/// @return Last value
struct signalValue Signal::last_value() const
{
- if(history_.empty()) {return signalValue();}
- return history_.rbegin()->second;
+ return value_;
}
uint64_t Signal::last_timestamp() const
{
- if(history_.empty()) {return 0;}
- return history_.rbegin()->first;
+ return timestamp_;
}
/// @brief Recursion check to ensure that there is no infinite loop