Skip to content

Commit

Permalink
change utils to auto mtu- Dont push until approved
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbalish1 committed Oct 16, 2024
1 parent a4a1fe4 commit c29f579
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 24 deletions.
10 changes: 6 additions & 4 deletions source/Utilities/AprilTagTestUtility/AprilTagTestUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int main(int argc,
char **argvPP)
{
std::string currentAddress = "10.66.171.21";
uint32_t mtu = 1500;
uint32_t mtu = 0;

crl::multisense::CameraProfile profile = crl::multisense::User_Control;
crl::multisense::system::ApriltagParams params;
Expand Down Expand Up @@ -211,10 +211,12 @@ int main(int argc,

//
// Change MTU

status = channelP->setMtu(mtu);
if (mtu >= 1500)
status = channelP->setMtu(mtu);
else
status = channelP->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
std::cerr << "Failed to set MTU: " << Channel::statusString(status) << std::endl;
goto clean_out;
}

Expand Down
10 changes: 6 additions & 4 deletions source/Utilities/ColorImageUtility/ColorImage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int main(int argc,
char** argvPP)
{
std::string currentAddress = "10.66.171.21";
int32_t mtu = 1500;
int32_t mtu = 0;
std::pair<DataSource, DataSource> userSource{ Source_Chroma_Rectified_Aux, Source_Luma_Rectified_Aux };

#if WIN32
Expand Down Expand Up @@ -222,10 +222,12 @@ int main(int argc,

//
// Change MTU

status = channelP->ptr()->setMtu(mtu);
if (mtu >= 1500)
status = channelP->ptr()->setMtu(mtu);
else
status = channelP->ptr()->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
std::cerr << "Failed to set MTU: " << Channel::statusString(status) << std::endl;
return EXIT_FAILURE;
}

Expand Down
10 changes: 6 additions & 4 deletions source/Utilities/DepthImageUtility/DepthImageUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ int main(int argc,
char **argvPP)
{
std::string currentAddress = "10.66.171.21";
int32_t mtu = 1500;
int32_t mtu = 0;
bool useColor = false;

#if WIN32
Expand Down Expand Up @@ -349,10 +349,12 @@ int main(int argc,
//
// Change MTU

status = channelP->ptr()->setMtu(mtu);
if (mtu >= 1500)
status = channelP->ptr()->setMtu(mtu);
else
status = channelP->ptr()->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
return EXIT_FAILURE;
std::cerr << "Failed to set MTU: " << Channel::statusString(status) << std::endl;
}

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int main(int argc,
//
// Change MTU

status = channelP->setMtu(mtu);
status = channelP->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
goto clean_out;
Expand Down
10 changes: 6 additions & 4 deletions source/Utilities/ImuTestUtility/ImuTestUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc,
{
std::string currentAddress = "10.66.171.21";
const char *logFileNameP = NULL;
uint32_t mtu = 1500;
uint32_t mtu = 0;

#if WIN32
SetConsoleCtrlHandler (signalHandler, TRUE);
Expand Down Expand Up @@ -216,10 +216,12 @@ int main(int argc,

//
// Change MTU

status = channelP->setMtu(mtu);
if (mtu >= 1500)
status = channelP->setMtu(mtu);
else
status = channelP->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
std::cerr << "Failed to set MTU: " << Channel::statusString(status) << std::endl;
goto clean_out;
}

Expand Down
10 changes: 6 additions & 4 deletions source/Utilities/PointCloudUtility/PointCloudUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ int main(int argc,
char **argvPP)
{
std::string currentAddress = "10.66.171.21";
int32_t mtu = 1500;
int32_t mtu = 0;
double minDisparity = 5.0;

#if WIN32
Expand Down Expand Up @@ -317,10 +317,12 @@ int main(int argc,

//
// Change MTU

status = channelP->ptr()->setMtu(mtu);
if (mtu >= 1500)
status = channelP->ptr()->setMtu(mtu);
else
status = channelP->ptr()->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
std::cerr << "Failed to set MTU: " << Channel::statusString(status) << std::endl;
return EXIT_FAILURE;
}

Expand Down
8 changes: 5 additions & 3 deletions source/Utilities/SaveImageUtility/SaveImageUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int main(int argc,
char **argvPP)
{
std::string currentAddress = "10.66.171.21";
int32_t mtu = 1500;
int32_t mtu = 0;
RemoteHeadChannel head_id = Remote_Head_VPB;

#if WIN32
Expand Down Expand Up @@ -384,8 +384,10 @@ int main(int argc,

//
// Change MTU

status = channelP->setMtu(mtu);
if (mtu >= 1500)
status = channelP->setMtu(mtu);
else
status = channelP->setBestMtu();
if (Status_Ok != status) {
std::cerr << "Failed to set MTU to " << mtu << ": " << Channel::statusString(status) << std::endl;
goto clean_out;
Expand Down

0 comments on commit c29f579

Please sign in to comment.