(device: &ButtplugClientDevice)
| 36 | } |
| 37 | |
| 38 | fn print_device_capabilities(device: &ButtplugClientDevice) { |
| 39 | println!(" {}", device.name()); |
| 40 | |
| 41 | // Check output capabilities (things we can make the device do) |
| 42 | let mut outputs = Vec::new(); |
| 43 | if device.output_available(OutputType::Vibrate) { |
| 44 | outputs.push("Vibrate"); |
| 45 | } |
| 46 | /* |
| 47 | if !device.rotate_features().is_empty() { |
| 48 | outputs.push("Rotate"); |
| 49 | } |
| 50 | if !device.oscillate_features().is_empty() { |
| 51 | outputs.push("Oscillate"); |
| 52 | } |
| 53 | if !device.position_features().is_empty() { |
| 54 | outputs.push("Position"); |
| 55 | } |
| 56 | */ |
| 57 | |
| 58 | if !outputs.is_empty() { |
| 59 | println!(" Outputs: {}", outputs.join(", ")); |
| 60 | } |
| 61 | |
| 62 | // Check input capabilities (sensors we can read) |
| 63 | let mut inputs = Vec::new(); |
| 64 | if device.input_available(buttplug_core::message::InputType::Battery) { |
| 65 | inputs.push("Battery"); |
| 66 | } |
| 67 | if device.input_available(buttplug_core::message::InputType::Rssi) { |
| 68 | inputs.push("RSSI"); |
| 69 | } |
| 70 | |
| 71 | if !inputs.is_empty() { |
| 72 | println!(" Inputs: {}", inputs.join(", ")); |
| 73 | } |
| 74 | |
| 75 | println!(); |
| 76 | } |
| 77 | |
| 78 | #[tokio::main] |
| 79 | async fn main() -> anyhow::Result<()> { |
no test coverage detected