Exemple #1
0
//获取倾斜度
e_int32 lm_get_tilt(angle_t* angle) {
	int ret, state;
	state = pause_loop();
	ret = hl_get_tilt(lm->lc, angle);
	resume_loop(state);
	return ret;
}
Exemple #2
0
int getTilt() {
	lm->usec_timestamp = GetTickCount();
	hl_get_tilt(lm->lc, &lm->tilt);
	if (lm->dm)
		dm_write_meta(lm->dm, lm->usec_timestamp, "DIP", "%8.4f,%8.4f",
				lm->tilt.dX, lm->tilt.dY);
//	DMSG((STDOUT,"tilt %8.4f %8.4f\n",lm->tilt.dX,lm->tilt.dY));
}
/*
 * Class:     com_hd_internal_Control
 * Method:    hl_get_tilt
 * Signature: (J)F
 */
JNIEXPORT jint JNICALL Java_com_hd_internal_Control_hl_1get_1tilt
(JNIEnv *env, jclass clazz, jlong priv,jdoubleArray jda)
{
	jdouble dangle[2];
	angle_t angle;
	int ret;
	laser_control_t* control = (laser_control_t*) priv;
	e_assert(control!=NULL, 0);
	ret = hl_get_tilt(control,&angle);
	e_assert(ret>0,0);
	dangle[0] = angle.dX;dangle[1] = angle.dY;
	(*env)->SetDoubleArrayRegion(env,jda,0,2,dangle);
	return 1;
}
Exemple #4
0
int getTilt() {
	hl_get_tilt(lm->lc, &lm->tilt);
//	DMSG((STDOUT,"tilt %8.4f %8.4f\n",lm->tilt.dX,lm->tilt.dY));
}