Skip to content

Commit

Permalink
removed debugging prints
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomors committed Oct 23, 2024
1 parent e0446c6 commit eba1387
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self) -> None:

# Start clock timer for driving thrusters every 0.2 seconds
# Declare "self.thruster_forces_array" in case no topic comes in at the first possible second
self.thruster_forces_array = [2.23] * 8
self.thruster_forces_array = [0.00] * 8

self.timer = self.create_timer(self.thrust_timer_period, self._timer_callback)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,6 @@ ThrusterInterfaceAUVDriver::ThrusterInterfaceAUVDriver(
COEFFS(COEFFS)
{



//DEBUGGING ONLY-----------------------------------------------------------------------
std::cout << "I2C_BUS: " << I2C_BUS << std::endl;
std::cout << "PICO_I2C_ADDRESS: " << PICO_I2C_ADDRESS << std::endl;
std::cout << "SYSTEM_OPERATIONAL_VOLTAGE: " << SYSTEM_OPERATIONAL_VOLTAGE << std::endl;
std::cout << "THRUSTER_MAPPING: ";
for (size_t i = 0; i < THRUSTER_MAPPING.size(); ++i) {
std::cout << THRUSTER_MAPPING[i] << " ";
}
std::cout << std::endl;
std::cout << "THRUSTER_DIRECTION: ";
for (size_t i = 0; i < THRUSTER_DIRECTION.size(); ++i) {
std::cout << THRUSTER_DIRECTION[i] << " ";
}
std::cout << std::endl;
std::cout << "THRUSTER_PWM_OFFSET: ";
for (size_t i = 0; i < THRUSTER_PWM_OFFSET.size(); ++i) {
std::cout << THRUSTER_PWM_OFFSET[i] << " ";
}
std::cout << std::endl;
std::cout << "PWM_MIN: ";
for (size_t i = 0; i < PWM_MIN.size(); ++i) {
std::cout << PWM_MIN[i] << " ";
}
std::cout << std::endl;
std::cout << "PWM_MAX: ";
for (size_t i = 0; i < PWM_MAX.size(); ++i) {
std::cout << PWM_MAX[i] << " ";
}
std::cout << std::endl;
for (auto const& [voltage, coeffs] : COEFFS) {
std::cout << "Voltage: " << (int)voltage << std::endl;
for (auto const& [direction, coeff] : coeffs) {
std::cout << "Direction: " << direction << std::endl;
for (size_t i = 0; i < coeff.size(); ++i) {
std::cout << coeff[i] << " ";
}
std::cout << std::endl;
}
}
//---------------------------------------------------------------------------------------



// Convert SYSTEM_OPERATIONAL_VOLTAGE passed as argument to assign the integer field variable [one is double, field var is int]
if (SYSTEM_OPERATIONAL_VOLTAGE < 11.0) {
this->SYSTEM_OPERATIONAL_VOLTAGE = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ThrusterInterfaceAUVNode::ThrusterInterfaceAUVNode() : Node("thruster_interface_
);

//Declare "thruster_forces_array" in case no topic comes in at the beginning
this->thruster_forces_array_ = std::vector<double>(8, 0.0);
this->thruster_forces_array_ = std::vector<double>(8, 0.00);

timer_ = this->create_wall_timer(
std::chrono::duration<double>(this->thrust_timer_period_),
Expand Down

0 comments on commit eba1387

Please sign in to comment.