File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
components/hid-rp/include Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,14 @@ class XboxBatteryInputReport : public hid::report::base<hid::report::type::INPUT
385385 return std::vector<uint8_t >(report_data, report_data + report_size);
386386 }
387387
388+ // / Set the input report data from a vector of bytes
389+ // / \param data The data to set the input report to.
390+ constexpr auto set_data (const std::vector<uint8_t > &data) {
391+ // copy the data into our data array - skip the first byte, which is the
392+ // report id
393+ std::copy (data.begin (), data.end (), this ->data () + 1 );
394+ }
395+
388396 // / Get the report descriptor as a hid::rdf::descriptor
389397 // / \return The report descriptor as a hid::rdf::descriptor.
390398 // / \note This is an incomplete descriptor, you will need to add it to a
You can’t perform that action at this time.
0 commit comments