We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96edbbb commit 4b86baeCopy full SHA for 4b86bae
components/hid-rp/include/hid-rp-xbox.hpp
@@ -385,6 +385,14 @@ class XboxBatteryInputReport : public hid::report::base<hid::report::type::INPUT
385
return std::vector<uint8_t>(report_data, report_data + report_size);
386
}
387
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
+
396
/// Get the report descriptor as a hid::rdf::descriptor
397
/// \return The report descriptor as a hid::rdf::descriptor.
398
/// \note This is an incomplete descriptor, you will need to add it to a
0 commit comments