Skip to content

Commit

Permalink
chore: temp dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomesdev committed Dec 24, 2023
1 parent b481134 commit 48af3ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/ps_move/controller.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::collections::HashMap;
use std::time::{SystemTime, UNIX_EPOCH};

use hidapi::{HidDevice, HidError};
use palette::{FromColor, Hsv, Srgb};
use tracing::info;
use tracing::{debug, info};

use crate::ps_move::effects::{LedEffect, RumbleEffect, RumbleEffectKind};
use crate::ps_move::models::{BatteryLevel, ButtonState, ConnectionType, ControllerInfo, DataInput, fill_state_from_byte_slice, MoveRequestType, MoveSetting};
Expand Down Expand Up @@ -232,6 +233,11 @@ impl PsMoveController {
}

fn update_hsv_and_rumble(&self) -> Result<(), ()> {
// temp
if SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis() % 1000 == 0 {
debug!("Current effect on controller update is {} (with {:?})", self.led_effect.kind, self.setting.led);
}

let request = build_set_led_and_rumble_request(self.setting.led, self.setting.rumble);

let res = self.device.write(&request);
Expand Down

0 comments on commit 48af3ce

Please sign in to comment.