Modifications after CristallinaMX beamtime

This commit is contained in:
2024-06-27 20:26:11 +02:00
parent 4e59930972
commit 1717e171b9
37 changed files with 1289 additions and 1140 deletions

View File

@@ -452,9 +452,14 @@ namespace {
auto r = GetRational(value);
message.timestamp = r.first;
message.timestamp_base = r.second;
} else if (key == "user_data")
message.user_data = GetCBORString(value);
else if (key == "spots")
} else if (key == "user_data") {
const std::string s = GetCBORString(value);
try {
message.user_data = nlohmann::json::parse(s);
} catch (...) {
message.user_data = s;
}
} else if (key == "spots")
GetCBORSpots(message, value);
else if (key == "spot_count_in_rings")
message.spot_count_in_rings = GetCBORUInt(value);