Log when reports are dropped without being read.
This commit is contained in:
parent
5ee7a85b33
commit
cf89c85569
1 changed files with 6 additions and 0 deletions
|
@ -454,12 +454,18 @@ impl<'d, const OUT_N: usize, const FEATURE_N: usize> ControlHandler
|
|||
Ok(ReportId::Out(_id)) => {
|
||||
let mut buf = [0; OUT_N];
|
||||
buf[0..data.len()].copy_from_slice(data);
|
||||
if self.out_signal.signaled() {
|
||||
warn!("Output report dropped before being read!");
|
||||
}
|
||||
self.out_signal.signal((data.len(), buf));
|
||||
OutResponse::Accepted
|
||||
}
|
||||
Ok(ReportId::Feature(_id)) => {
|
||||
let mut buf = [0; FEATURE_N];
|
||||
buf[0..data.len()].copy_from_slice(data);
|
||||
if self.feature_signal.signaled() {
|
||||
warn!("Feature report dropped before being read!");
|
||||
}
|
||||
self.feature_signal.signal((data.len(), buf));
|
||||
OutResponse::Accepted
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue