diff --git a/src/runtime_src/core/common/sensor.cpp b/src/runtime_src/core/common/sensor.cpp index 17cff504808..57f2b6bd0dd 100644 --- a/src/runtime_src/core/common/sensor.cpp +++ b/src/runtime_src/core/common/sensor.cpp @@ -445,8 +445,10 @@ read_electrical(const xrt_core::device * device) //Check for any of these data is available if (!current.empty() || !voltage.empty() || !power.empty()) return read_data_driven_electrical(current, voltage, power); - else + else { + sensor_array.put("msg", "No sensors present"); return sensor_array; + } } catch(const xrt_core::query::no_such_key&) { is_data_driven = false; @@ -477,7 +479,7 @@ read_thermals(const xrt_core::device * device) try { output = xrt_core::device_query(device, xq::sdm_sensor_info::sdr_req_type::thermal); if (output.empty()) { - thermal_array.put("error_msg", "Information unavailable"); + thermal_array.put("msg", "No sensors present"); root.add_child("thermals", thermal_array); return root; } @@ -512,7 +514,7 @@ read_mechanical(const xrt_core::device * device) try { output = xrt_core::device_query(device, xq::sdm_sensor_info::sdr_req_type::mechanical); if (output.empty()) { - fan_array.put("error_msg", "Information unavailable"); + fan_array.put("msg", "No sensors present"); root.add_child("fans", fan_array); return root; }