mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-27 07:59:59 -07:00
Add build features for multiple device types
The bin crate now has two features, one for each supported device. * The IOCTL change from #142 is compiled in conditionally. * Tp-link display is supported & tested for HW rev 3 and HW rev 5. The release tarballs now contain two rayhunter-daemon binaries, for orbic and tplink. An installer for tplink is not yet included. Co-authored-by: m0veax <m0veax@chaospott.de>
This commit is contained in:
29
bin/src/display/mod.rs
Normal file
29
bin/src/display/mod.rs
Normal file
@@ -0,0 +1,29 @@
|
||||
mod generic_framebuffer;
|
||||
|
||||
#[cfg(feature = "tplink")]
|
||||
mod tplink;
|
||||
#[cfg(feature = "tplink")]
|
||||
mod tplink_framebuffer;
|
||||
#[cfg(feature = "tplink")]
|
||||
mod tplink_onebit;
|
||||
|
||||
#[cfg(feature = "tplink")]
|
||||
pub use tplink::update_ui;
|
||||
|
||||
#[cfg(feature = "orbic")]
|
||||
mod orbic;
|
||||
#[cfg(feature = "orbic")]
|
||||
pub use orbic::update_ui;
|
||||
|
||||
pub enum DisplayState {
|
||||
Recording,
|
||||
Paused,
|
||||
WarningDetected,
|
||||
RecordingCBM,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "orbic", feature = "tplink"))]
|
||||
compile_error!("cannot compile for many devices at once");
|
||||
|
||||
#[cfg(not(any(feature = "orbic", feature = "tplink")))]
|
||||
compile_error!("cannot compile for no device at all");
|
||||
Reference in New Issue
Block a user