diff --git a/examples/device_exam.cpp b/examples/device_exam.cpp index 0aa3d10..ac4e169 100644 --- a/examples/device_exam.cpp +++ b/examples/device_exam.cpp @@ -40,9 +40,10 @@ int main() return {}; }, [&s](adc_result_t const&) -> adc_result_t { return s.c_str(); }, - [&s](adc_result_t const& p) -> adc_result_t { - s = p.value(); - return s; + [&s](adc_result_t const& p) mutable -> adc_result_t { + // s = p.value(); + // return s; + return std::string(p.value()); }); std::print("get '{}'-attr value as native int:\t", id1);