Clean up warnings: suppress dead_code for conditional pipeline modules

Removes unused imports/variables via cargo fix and adds #[allow(dead_code)]
for modules used conditionally at runtime (CSI, depth, fusion, serial).
Pointcloud: 28 → 0 warnings. Geo: 2 → 0 warnings. 8/8 tests pass.

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv 2026-04-20 10:16:34 -04:00
parent ca3c58a69f
commit 8eb808de03
10 changed files with 18 additions and 8 deletions

View File

@ -3,7 +3,9 @@
use crate::types::{GeoPoint, GeoBBox, TileCoord}; use crate::types::{GeoPoint, GeoBBox, TileCoord};
const WGS84_A: f64 = 6_378_137.0; const WGS84_A: f64 = 6_378_137.0;
#[allow(dead_code)]
const WGS84_F: f64 = 1.0 / 298.257_223_563; const WGS84_F: f64 = 1.0 / 298.257_223_563;
#[allow(dead_code)]
const WGS84_E2: f64 = 2.0 * WGS84_F - WGS84_F * WGS84_F; const WGS84_E2: f64 = 2.0 * WGS84_F - WGS84_F * WGS84_F;
/// Haversine distance in meters. /// Haversine distance in meters.

View File

@ -1,4 +1,5 @@
//! Camera capture — cross-platform frame grabber. //! Camera capture — cross-platform frame grabber.
#![allow(dead_code)]
//! //!
//! macOS: uses `screencapture` or `ffmpeg -f avfoundation` for camera frames //! macOS: uses `screencapture` or `ffmpeg -f avfoundation` for camera frames
//! Linux: uses `v4l2-ctl` or `ffmpeg -f v4l2` for camera frames //! Linux: uses `v4l2-ctl` or `ffmpeg -f v4l2` for camera frames

View File

@ -91,7 +91,7 @@ impl CsiReceiver {
// Extract per-link attenuations for tomography // Extract per-link attenuations for tomography
let attenuations: Vec<f64> = links.iter().map(|l| l.attenuation).collect(); let attenuations: Vec<f64> = links.iter().map(|l| l.attenuation).collect();
let n_links = attenuations.len(); let _n_links = attenuations.len();
// Simple grid-based tomography (ISTA solver would go here) // Simple grid-based tomography (ISTA solver would go here)
let nx = 8; let nx = 8;
@ -102,7 +102,7 @@ impl CsiReceiver {
// For each link, distribute attenuation along the line between TX and RX // For each link, distribute attenuation along the line between TX and RX
// This is a simplified backprojection — real tomography uses ISTA L1 solver // This is a simplified backprojection — real tomography uses ISTA L1 solver
for (i, atten) in attenuations.iter().enumerate() { for (_i, atten) in attenuations.iter().enumerate() {
// Distribute attenuation uniformly across voxels // Distribute attenuation uniformly across voxels
// (in production, use link geometry for proper ray tracing) // (in production, use link geometry for proper ray tracing)
let contribution = atten / total as f64; let contribution = atten / total as f64;

View File

@ -1,4 +1,5 @@
//! Complete CSI processing pipeline — ADR-018 parser → WiFlow pose → vitals → tomography. //! Complete CSI processing pipeline — ADR-018 parser → WiFlow pose → vitals → tomography.
#![allow(dead_code)]
//! //!
//! Receives raw UDP frames from ESP32 nodes, extracts I/Q subcarrier data, //! Receives raw UDP frames from ESP32 nodes, extracts I/Q subcarrier data,
//! runs the WiFlow pose model, detects motion, estimates vitals, and produces //! runs the WiFlow pose model, detects motion, estimates vitals, and produces

View File

@ -1,4 +1,5 @@
//! Monocular depth estimation via MiDaS ONNX + backprojection to 3D points. //! Monocular depth estimation via MiDaS ONNX + backprojection to 3D points.
#![allow(dead_code)]
use crate::pointcloud::{PointCloud, ColorPoint}; use crate::pointcloud::{PointCloud, ColorPoint};
use anyhow::Result; use anyhow::Result;
@ -163,7 +164,7 @@ fn estimate_depth_midas_server(rgb: &[u8], width: u32, height: u32) -> Result<Ve
} }
/// Capture depth cloud from camera (placeholder — real impl uses nokhwa or v4l2). /// Capture depth cloud from camera (placeholder — real impl uses nokhwa or v4l2).
pub async fn capture_depth_cloud(frames: usize) -> Result<PointCloud> { pub async fn capture_depth_cloud(_frames: usize) -> Result<PointCloud> {
eprintln!("Camera capture not available (no camera on this machine)."); eprintln!("Camera capture not available (no camera on this machine).");
eprintln!("Use --demo for synthetic data, or run on a machine with a camera."); eprintln!("Use --demo for synthetic data, or run on a machine with a camera.");
Ok(demo_depth_cloud()) Ok(demo_depth_cloud())
@ -171,7 +172,7 @@ pub async fn capture_depth_cloud(frames: usize) -> Result<PointCloud> {
/// Generate a demo depth point cloud (synthetic room scene). /// Generate a demo depth point cloud (synthetic room scene).
pub fn demo_depth_cloud() -> PointCloud { pub fn demo_depth_cloud() -> PointCloud {
let mut cloud = PointCloud::new("demo_camera_depth"); let _cloud = PointCloud::new("demo_camera_depth");
let intrinsics = CameraIntrinsics::default(); let intrinsics = CameraIntrinsics::default();
// Simulate a depth map: room with walls at 3m, floor, and a person at 2m // Simulate a depth map: room with walls at 3m, floor, and a person at 2m

View File

@ -1,4 +1,5 @@
//! Multi-modal fusion: camera depth + WiFi RF tomography → unified point cloud. //! Multi-modal fusion: camera depth + WiFi RF tomography → unified point cloud.
#![allow(dead_code)]
use crate::pointcloud::{PointCloud, ColorPoint}; use crate::pointcloud::{PointCloud, ColorPoint};
use std::collections::HashMap; use std::collections::HashMap;

View File

@ -10,13 +10,16 @@
//! ruview-pointcloud train # calibration training //! ruview-pointcloud train # calibration training
//! ruview-pointcloud csi-test # send test CSI frames //! ruview-pointcloud csi-test # send test CSI frames
#[allow(dead_code)]
mod brain_bridge; mod brain_bridge;
mod camera; mod camera;
#[allow(dead_code)]
mod csi; mod csi;
mod csi_pipeline; mod csi_pipeline;
mod depth; mod depth;
mod fusion; mod fusion;
mod pointcloud; mod pointcloud;
#[allow(dead_code)]
mod serial_csi; mod serial_csi;
mod stream; mod stream;
mod training; mod training;
@ -90,7 +93,7 @@ async fn main() -> Result<()> {
} }
stream::serve(&host, port, brain.as_deref()).await?; stream::serve(&host, port, brain.as_deref()).await?;
} }
Commands::Capture { frames, output } => { Commands::Capture { frames: _, output } => {
if camera::camera_available() { if camera::camera_available() {
let config = camera::CameraConfig::default(); let config = camera::CameraConfig::default();
let frame = camera::capture_frame(&config)?; let frame = camera::capture_frame(&config)?;

View File

@ -1,4 +1,5 @@
//! Point cloud types + PLY export + Gaussian splat conversion. //! Point cloud types + PLY export + Gaussian splat conversion.
#![allow(dead_code)]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::io::Write; use std::io::Write;

View File

@ -1,4 +1,5 @@
//! HTTP server — live camera + ESP32 CSI + fusion → real-time point cloud. //! HTTP server — live camera + ESP32 CSI + fusion → real-time point cloud.
#![allow(dead_code)]
use crate::brain_bridge; use crate::brain_bridge;
use crate::camera; use crate::camera;
@ -8,7 +9,7 @@ use crate::fusion;
use crate::pointcloud; use crate::pointcloud;
use axum::{ use axum::{
extract::State, extract::State,
response::{Html, IntoResponse}, response::Html,
routing::get, routing::get,
Json, Router, Json, Router,
}; };

View File

@ -8,7 +8,6 @@
//! 3. **Brain integration**: store spatial observations as brain memories for //! 3. **Brain integration**: store spatial observations as brain memories for
//! DPO training — "this depth estimate was correct" vs "this was wrong" //! DPO training — "this depth estimate was correct" vs "this was wrong"
use crate::pointcloud::PointCloud;
use crate::fusion::OccupancyVolume; use crate::fusion::OccupancyVolume;
use anyhow::Result; use anyhow::Result;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -317,7 +316,7 @@ impl TrainingSession {
let mut stored = 0u32; let mut stored = 0u32;
// Store calibration as brain memory // Store calibration as brain memory
let cal_json = serde_json::to_string(&self.calibration)?; let _cal_json = serde_json::to_string(&self.calibration)?;
let body = serde_json::json!({ let body = serde_json::json!({
"category": "spatial-calibration", "category": "spatial-calibration",
"content": format!("Depth calibration: scale={:.2} offset={:.2} gamma={:.2} RMSE={:.4}m ({} samples)", "content": format!("Depth calibration: scale={:.2} offset={:.2} gamma={:.2} RMSE={:.4}m ({} samples)",