Skip to content

Commit 03e7756

Browse files
committed
phy: fix config dump
1 parent 1b31417 commit 03e7756

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

apps/units/flexible_o_du/split_8/helpers/ru_sdr_config_yaml_writer.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,21 @@ static void fill_ru_sdr_section(YAML::Node node, const ru_sdr_unit_config& confi
7979
node["sync"] = config.synch_source;
8080
node["otw_format"] = config.otw_format;
8181
if (config.time_alignment_calibration.has_value()) {
82-
node["time_alignment_calibration"] = config.time_alignment_calibration.value();
82+
node["time_alignment_calibration"] = *config.time_alignment_calibration;
83+
} else {
84+
node["time_alignment_calibration"] = "na";
85+
}
86+
if (config.start_time.has_value()) {
87+
::time_t tt = std::chrono::system_clock::to_time_t(*config.start_time);
88+
::tm utc_time;
89+
::gmtime_r(&tt, &utc_time);
90+
91+
char buffer[100];
92+
::strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &utc_time);
93+
94+
node["start_time"] = buffer;
95+
} else {
96+
node["start_time"] = "na";
8397
}
8498

8599
{

0 commit comments

Comments
 (0)