Skip to content

Commit 8eb808d

Browse files
committed
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>
1 parent ca3c58a commit 8eb808d

File tree

10 files changed

+18
-8
lines changed

10 files changed

+18
-8
lines changed

rust-port/wifi-densepose-rs/crates/wifi-densepose-geo/src/coord.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
use crate::types::{GeoPoint, GeoBBox, TileCoord};
44

55
const WGS84_A: f64 = 6_378_137.0;
6+
#[allow(dead_code)]
67
const WGS84_F: f64 = 1.0 / 298.257_223_563;
8+
#[allow(dead_code)]
79
const WGS84_E2: f64 = 2.0 * WGS84_F - WGS84_F * WGS84_F;
810

911
/// Haversine distance in meters.

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/camera.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Camera capture — cross-platform frame grabber.
2+
#![allow(dead_code)]
23
//!
34
//! macOS: uses `screencapture` or `ffmpeg -f avfoundation` for camera frames
45
//! Linux: uses `v4l2-ctl` or `ffmpeg -f v4l2` for camera frames

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/csi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl CsiReceiver {
9191

9292
// Extract per-link attenuations for tomography
9393
let attenuations: Vec<f64> = links.iter().map(|l| l.attenuation).collect();
94-
let n_links = attenuations.len();
94+
let _n_links = attenuations.len();
9595

9696
// Simple grid-based tomography (ISTA solver would go here)
9797
let nx = 8;
@@ -102,7 +102,7 @@ impl CsiReceiver {
102102

103103
// For each link, distribute attenuation along the line between TX and RX
104104
// This is a simplified backprojection — real tomography uses ISTA L1 solver
105-
for (i, atten) in attenuations.iter().enumerate() {
105+
for (_i, atten) in attenuations.iter().enumerate() {
106106
// Distribute attenuation uniformly across voxels
107107
// (in production, use link geometry for proper ray tracing)
108108
let contribution = atten / total as f64;

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/csi_pipeline.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Complete CSI processing pipeline — ADR-018 parser → WiFlow pose → vitals → tomography.
2+
#![allow(dead_code)]
23
//!
34
//! Receives raw UDP frames from ESP32 nodes, extracts I/Q subcarrier data,
45
//! runs the WiFlow pose model, detects motion, estimates vitals, and produces

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/depth.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Monocular depth estimation via MiDaS ONNX + backprojection to 3D points.
2+
#![allow(dead_code)]
23

34
use crate::pointcloud::{PointCloud, ColorPoint};
45
use anyhow::Result;
@@ -163,15 +164,15 @@ fn estimate_depth_midas_server(rgb: &[u8], width: u32, height: u32) -> Result<Ve
163164
}
164165

165166
/// Capture depth cloud from camera (placeholder — real impl uses nokhwa or v4l2).
166-
pub async fn capture_depth_cloud(frames: usize) -> Result<PointCloud> {
167+
pub async fn capture_depth_cloud(_frames: usize) -> Result<PointCloud> {
167168
eprintln!("Camera capture not available (no camera on this machine).");
168169
eprintln!("Use --demo for synthetic data, or run on a machine with a camera.");
169170
Ok(demo_depth_cloud())
170171
}
171172

172173
/// Generate a demo depth point cloud (synthetic room scene).
173174
pub fn demo_depth_cloud() -> PointCloud {
174-
let mut cloud = PointCloud::new("demo_camera_depth");
175+
let _cloud = PointCloud::new("demo_camera_depth");
175176
let intrinsics = CameraIntrinsics::default();
176177

177178
// Simulate a depth map: room with walls at 3m, floor, and a person at 2m

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/fusion.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Multi-modal fusion: camera depth + WiFi RF tomography → unified point cloud.
2+
#![allow(dead_code)]
23

34
use crate::pointcloud::{PointCloud, ColorPoint};
45
use std::collections::HashMap;

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010
//! ruview-pointcloud train # calibration training
1111
//! ruview-pointcloud csi-test # send test CSI frames
1212
13+
#[allow(dead_code)]
1314
mod brain_bridge;
1415
mod camera;
16+
#[allow(dead_code)]
1517
mod csi;
1618
mod csi_pipeline;
1719
mod depth;
1820
mod fusion;
1921
mod pointcloud;
22+
#[allow(dead_code)]
2023
mod serial_csi;
2124
mod stream;
2225
mod training;
@@ -90,7 +93,7 @@ async fn main() -> Result<()> {
9093
}
9194
stream::serve(&host, port, brain.as_deref()).await?;
9295
}
93-
Commands::Capture { frames, output } => {
96+
Commands::Capture { frames: _, output } => {
9497
if camera::camera_available() {
9598
let config = camera::CameraConfig::default();
9699
let frame = camera::capture_frame(&config)?;

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/pointcloud.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Point cloud types + PLY export + Gaussian splat conversion.
2+
#![allow(dead_code)]
23

34
use serde::{Deserialize, Serialize};
45
use std::io::Write;

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! HTTP server — live camera + ESP32 CSI + fusion → real-time point cloud.
2+
#![allow(dead_code)]
23

34
use crate::brain_bridge;
45
use crate::camera;
@@ -8,7 +9,7 @@ use crate::fusion;
89
use crate::pointcloud;
910
use axum::{
1011
extract::State,
11-
response::{Html, IntoResponse},
12+
response::Html,
1213
routing::get,
1314
Json, Router,
1415
};

rust-port/wifi-densepose-rs/crates/wifi-densepose-pointcloud/src/training.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//! 3. **Brain integration**: store spatial observations as brain memories for
99
//! DPO training — "this depth estimate was correct" vs "this was wrong"
1010
11-
use crate::pointcloud::PointCloud;
1211
use crate::fusion::OccupancyVolume;
1312
use anyhow::Result;
1413
use serde::{Deserialize, Serialize};
@@ -317,7 +316,7 @@ impl TrainingSession {
317316
let mut stored = 0u32;
318317

319318
// Store calibration as brain memory
320-
let cal_json = serde_json::to_string(&self.calibration)?;
319+
let _cal_json = serde_json::to_string(&self.calibration)?;
321320
let body = serde_json::json!({
322321
"category": "spatial-calibration",
323322
"content": format!("Depth calibration: scale={:.2} offset={:.2} gamma={:.2} RMSE={:.4}m ({} samples)",

0 commit comments

Comments
 (0)