Beispiel #1
0
void cmd_vibrator_once(int argc, char** argv)
{
	if(argc < 2) {
		bufferPrintf("Usage: %s <duration in ms>\r\n", argv[0]);
		return;
	}

	int time = parseNumber(argv[1]) * 1000;

	bufferPrintf("Turning on vibrator for %d microseconds.\r\n", time);

	vibrator_once(time);
}
Beispiel #2
0
void cmd_vibrator_once(int argc, char** argv)
{
	if(argc < 3) {
		bufferPrintf("Usage: %s <frequency 1-12> <duration in ms>\r\n", argv[0]);
		return;
	}

	int frequency = parseNumber(argv[1]);
	int time = parseNumber(argv[2]);

	bufferPrintf("Turning on vibrator at frequency %d for %d ms.\r\n", frequency, time);

	vibrator_once(frequency, time);
}