feat(core,radxa): extract cross-platform fpv-core workspace crate and add usb0 DHCP setup for Android

This commit is contained in:
bleack committed 2026-11-27 00:03:24 +01:00
1 parent 9a8ae95b3f
commit 16d05785fb
18 files changed
+2119 -1298

No files matched your search

+1 -56
View File
@@ -133,62 +133,7 @@ pub(super) fn eviocgabs(abs_code: u16) -> std::ffi::c_ulong {
// TYPES PUBLICS : SOURCE DE CONTRÔLE & ÉTAT STEAM CONTROLLER
// =========================================================================
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[repr(u8)]
pub enum ControlSource {
#[default]
G29 = 0,
SteamController = 1,
}
impl ControlSource {
pub fn from_str(s: &str) -> Self {
let lower = s.trim().to_ascii_lowercase();
if lower == "steam"
|| lower == "steam_controller"
|| lower == "steam-controller"
|| lower == "controller"
|| lower == "gamepad"
|| lower == "ext"
{
Self::SteamController
} else {
Self::G29
}
}
pub fn from_u8(v: u8) -> Self {
match v {
1 => Self::SteamController,
_ => Self::G29,
}
}
pub fn as_u8(self) -> u8 {
self as u8
}
pub fn as_str(self) -> &'static str {
match self {
Self::G29 => "g29",
Self::SteamController => "steam",
}
}
pub fn wire_tag(self) -> &'static str {
match self {
Self::G29 => "G29",
Self::SteamController => "EXT",
}
}
pub fn label(self) -> &'static str {
match self {
Self::G29 => "Volant G29",
Self::SteamController => "Steam Controller",
}
}
}
pub use fpv_core::ControlSource;
#[derive(Debug, Clone)]
pub struct SteamControllerConfig {