fix get_unit with correct marker name, generalize example.py

This commit is contained in:
Mario Fink
2020-07-29 17:17:01 +02:00
parent 6b3aac87fe
commit 53377ec75b
2 changed files with 30 additions and 10 deletions

View File

@@ -529,8 +529,9 @@ public:
std::string get_unit()
{
// assert ( segments_.size() > 0 );
if ( datasec_["punit"].size() > 0 )
if ( datasec_["punit marker"].size() > 0
&& segments_["punit marker"].size() > 6 )
{
return valid_ ? segments_["punit marker"][7] : std::string("None");
}