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
385
385
return std::vector<uint8_t >(report_data, report_data + report_size);
386
386
}
387
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
+
388
396
// / Get the report descriptor as a hid::rdf::descriptor
389
397
// / \return The report descriptor as a hid::rdf::descriptor.
390
398
// / \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