use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("No Bluetooth adapters found")]
NoBluetoothAdapters,
#[error("No compatible LED device found")]
NoCompatibleDevice,
#[error("Could not find required BLE characteristic: {0}")]
CharacteristicNotFound(String),
#[error("BLE communication error: {0}")]
BleError(String),
#[error("Command timed out after {0} retries")]
CommandTimeout(u8),
#[error("Value {0} out of range ({1}..{2})")]
ValueOutOfRange(u32, u32, u32),
#[error("Error: {0}")]
General(String),
#[error(transparent)]
BtlePlugError(#[from] btleplug::Error),
#[error("Audio capture error: {0}")]
AudioCaptureError(String),
#[error("Audio stream build error: {0}")]
StreamBuildError(String),
#[error("Audio stream play error: {0}")]
StreamPlayError(String),
#[error(transparent)]
Other(#[from] Box<dyn std::error::Error + Send + Sync>),
}
pub type Result<T> = std::result::Result<T, Error>;
pub mod audio;
pub mod device;
pub mod effects;
pub mod schedule;
pub use audio::{AudioMonitor, AudioVisualization, FrequencyRange, VisualizationMode};
pub use device::{BleLedDevice, Days, DeviceConfig, DeviceType, Effects, EFFECTS, WEEK_DAYS};