Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
add Float number print in DataElement::Parser::ParseData
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed May 4, 2020
1 parent 4ccba6b commit 3081c2f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib/profiles/data-management/Current/MessageDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,17 @@ DataElement::Parser::ParseData(nl::Weave::TLV::TLVReader & aReader, int aDepth)
break;
}

case nl::Weave::TLV::kTLVType_FloatingPointNumber:
{
double value_fp;

err = aReader.Get(value_fp);
SuccessOrExit(err);

PRETTY_PRINT_SAMELINE("%lf, ", value_fp);
break;
}

case nl::Weave::TLV::kTLVType_Boolean:
{
bool value_b;
Expand Down

0 comments on commit 3081c2f

Please sign in to comment.