Skip to content

Commit

Permalink
Versioned
Browse files Browse the repository at this point in the history
	- Versioning for all available controller applications
	- Minor fixes
	- ROS integration available for WT901
  • Loading branch information
twdragon committed Jul 28, 2022
1 parent d4d4930 commit 3c7d6fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/wt31n-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ int main(int argc, char** args)
sigaction(SIGINT, &sigIntHandler, NULL);

QCoreApplication app(argc, args);
app.setApplicationVersion(QString(witmotion::library_version().c_str()));
QCommandLineParser parser;
parser.setApplicationDescription("WITMOTION WT31N STANDALONE SENSOR CONTROLLER/MONITOR");
parser.addHelpOption();
Expand Down
12 changes: 6 additions & 6 deletions src/wt901-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ int main(int argc, char** args)
sigaction(SIGINT, &sigIntHandler, NULL);

QCoreApplication app(argc, args);
app.setApplicationVersion(QString(witmotion::library_version().c_str()));
QCommandLineParser parser;
parser.setApplicationDescription("WITMOTION WT901 STANDALONE SENSOR CONTROLLER/MONITOR");
parser.addHelpOption();
QCommandLineOption BaudRateOption(QStringList() << "b" << "baudrate",
"Baudrate to set up the port",
"9600 or 115200",
"2400 to 115200",
"9600");
QCommandLineOption IntervalOption(QStringList() << "i" << "interval",
"Port polling interval",
Expand All @@ -66,11 +67,11 @@ int main(int argc, char** args)
"Run spatial calibration");
QCommandLineOption SetBaudRateOption(QStringList() << "set-baudrate",
"Reset the connection baud rate",
"2400, 4800, 9600, 19200, 38400, 57600, 115200",
"2400 to 115200",
"9600");
QCommandLineOption SetPollingRateOption(QStringList() << "set-frequency",
"Set output polling frequency, Hz",
"-10 for 0.1, -2 for 0.5, 1-200, 0 for stop, -1 for single shot",
"1 - 200 Hz",
"10");
QCommandLineOption CovarianceOption("covariance",
"Measure spatial covariance");
Expand Down Expand Up @@ -226,8 +227,8 @@ int main(int argc, char** args)
std::cout << std::endl << "Calibrating..." << std::endl;
sensor.UnlockConfiguration();
sensor.Calibrate();
sleep(5);
sensor.ConfirmConfiguration();
sleep(1);
std::cout << "Calibration completed. Please reconnect now" << std::endl;
std::exit(0);
}
Expand Down Expand Up @@ -342,8 +343,7 @@ int main(int argc, char** args)
<< accels_y[i] << " | "
<< accels_z[i] << " ]"
<< std::endl;
logfile << i + 1 << "\t"
<< "Angular velocities [X|Y|Z]:\t[ "
logfile << "Angular velocities [X|Y|Z]:\t[ "
<< vels_x[i] << " | "
<< vels_y[i] << " | "
<< vels_z[i] << " ]"
Expand Down

0 comments on commit 3c7d6fd

Please sign in to comment.