Example #1
0
int main(int argc, char** argv) {

	// Message to user
	printf("\n"
			"                  *** Barrett WAM Autotensioning Utility ***\n"
			"\n"
			"This utility will autotension the specified cables of your WAM Arm.\n"
			"Cable tensioning is necessary after signs of the WAM cables becoming\n"
			"loose after extended use, or after replacing any cables on your WAM Arm.\n"
			"After completion of this routine, you must zero calibrate and gravity\n"
			"calibrate the WAM, as pulling tension from the cables will introduce\n"
			"offsets to your previous calibrations.\n"
			"\n"
			"WAMs with serial numbers < 5 and WAM wrists with serial numbers < 9 are not\n"
			"eligible for autotensioning.\n"
			"\n"
			"This program assumes the WAM is mounted such that the base is horizontal.\n"
			"\n"
			"\n");

	// For clean stack traces
	barrett::installExceptionHandler();

	// Create our product manager
	ProductManager pm;
	pm.waitForWam();

	if (pm.foundWam4()) {
		return wam_main<4>(argc, argv, pm, *pm.getWam4(true, NULL));
	} else if (pm.foundWam7()) {
		return wam_main<7>(argc, argv, pm, *pm.getWam7(true, NULL));
	}
}