Skip to content

Commit

Permalink
Pushing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nwdepatie committed Mar 27, 2024
1 parent 1e47fb7 commit f3da418
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
8 changes: 6 additions & 2 deletions mercury-app/src/hw_ifc/src/gantry_sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ impl GantryController {
.model
.calc_control_signals(GantryPosition::new(data.x, data.y, data.z));

self.write_steppers(stepper_cmds);
rosrust::ros_info!("X:{}\tY:{}\tZ:{}", data.x, data.y, data.z);

//self.write_steppers(stepper_cmds);
}

pub fn calibrate_callback(&mut self) {
let stepper_cmds = self
.model
.calc_control_signals(GantryPosition::new(0.0, 0.0, 0.0));

self.write_steppers(stepper_cmds);
rosrust::ros_info!("CALIBRATING...");

//self.write_steppers(stepper_cmds);
}
}

Expand Down
16 changes: 8 additions & 8 deletions mercury-app/src/hw_ifc/src/regmap.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pub const DRV_DIR_GPIO_ADDR: u32 = 0x4122_0000;
pub const DRV_DIR_GPIO_ADDR: u32 = 0x8000_0000;
pub const DRV_TIMER_FRONT_RIGHT_ADDR: u32 = 0x4280_0000;
pub const DRV_TIMER_FRONT_LEFT_ADDR: u32 = 0x4281_0000;
pub const DRV_TIMER_BACK_RIGHT_ADDR: u32 = 0x4282_0000;
pub const DRV_TIMER_BACK_LEFT_ADDR: u32 = 0x4283_0000;

pub const GANTRY_DIR1_ADDR: u32 = 0x8000_0000; // TODO: Double check Gantry DIR 1 behavior
pub const GANTRY_DIR2_ADDR: u32 = 0x4120_0000;
pub const GANTRY_DIR3_ADDR: u32 = 0x4121_0000;
pub const GANTRY_RESET_ADDR: u32 = 0x4126_0000;
pub const GANTRY_STEP1_ADDR: u32 = 0x4123_0000;
pub const GANTRY_STEP2_ADDR: u32 = 0x4124_0000;
pub const GANTRY_STEP3_ADDR: u32 = 0x4125_0000;
pub const GANTRY_DIR1_ADDR: u32 = 0x4120_0000; // TODO: Double check Gantry DIR 1 behavior
pub const GANTRY_DIR2_ADDR: u32 = 0x4121_0000;
pub const GANTRY_DIR3_ADDR: u32 = 0x4122_0000;
pub const GANTRY_RESET_ADDR: u32 = 0x4123_0000;
pub const GANTRY_STEP1_ADDR: u32 = 0x4124_0000;
pub const GANTRY_STEP2_ADDR: u32 = 0x4125_0000;
pub const GANTRY_STEP3_ADDR: u32 = 0x4126_0000;
3 changes: 3 additions & 0 deletions mercury-app/src/hw_srv/srv/frontlight.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint32 brightness
---
bool status
4 changes: 2 additions & 2 deletions mercury-app/src/hw_srv/srv/grip.srv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bool brightness
---
---
bool status
2 changes: 2 additions & 0 deletions mercury-app/src/hw_srv/srv/release.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
bool status
5 changes: 3 additions & 2 deletions mercury-app/src/hw_srv/srv/worklight.srv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bool brightness
---
uint32 brightness
---
bool status

0 comments on commit f3da418

Please sign in to comment.