Method to read TemperatureLogger record capacity.

This commit is contained in:
Jared Boone 2015-12-17 12:12:22 -08:00
parent 17d405ccec
commit 146a06b0d1
2 changed files with 7 additions and 2 deletions

View File

@ -33,7 +33,11 @@ void TemperatureLogger::second_tick() {
}
size_t TemperatureLogger::size() const {
return std::min(samples.size(), samples_count);
return std::min(capacity(), samples_count);
}
size_t TemperatureLogger::capacity() const {
return samples.size();
}
std::vector<TemperatureLogger::sample_t> TemperatureLogger::history() const {

View File

@ -34,6 +34,7 @@ public:
void second_tick();
size_t size() const;
size_t capacity() const;
std::vector<sample_t> history() const;