Commit 113412ee authored by Aurélien Delrieu's avatar Aurélien Delrieu

Merge branch 'dev' to fix precision of float probes

parents 1dde716c 142c3ef9
......@@ -90,6 +90,30 @@ bool Probe<float>::getData(unsigned char* buffer, size_t len) const
return true;
}
template<>
string Probe<float>::getStrData() const
{
std::stringstream strs;
strs.setf(std::ios_base::fixed);
strs.precision(12);
float val = this->get();
strs << val;
return strs.str();
}
template<>
string Probe<double>::getStrData() const
{
std::stringstream strs;
strs.setf(std::ios_base::fixed);
strs.precision(12);
float val = this->get();
strs << val;
return strs.str();
}
template<>
bool Probe<double>::getData(unsigned char* buffer, size_t len) const
{
......
......@@ -71,7 +71,7 @@ public:
bool getData(unsigned char* buffer, size_t len) const;
string getStrData() const;
string getStrData() const;
private:
Probe(uint8_t id, const string &name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment