예제 #1
0
//硬件信息
e_int32 lm_get_info(e_uint32 idx, e_uint8* buffer, e_int32 blen) {
	int ret, state;
	state = pause_loop();
	ret = hl_get_info(lm->lc, idx, buffer, blen);
	resume_loop(state);
	return ret;
}
예제 #2
0
//获取状态
e_float64 lm_get_battery() {
	e_float64 ret;
	int state = pause_loop();
	ret = hl_get_battery(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #3
0
//以最快速度调整到指定水平范围起始角
e_int32 lm_search_zero() {
	int ret, state;
	state = pause_loop();
	ret = hl_search_zero(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #4
0
//获取温度
e_float64 lm_get_temperature() {
	e_float64 ret;
	int state = pause_loop();
	ret = hl_get_temperature(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #5
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;
}
예제 #6
0
//获取当前水平转台的角度
e_int32 lm_turntable_get_step() {
	int ret, state;
	state = pause_loop();
	ret = hl_turntable_get_step(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #7
0
e_float64 lm_turntable_get_angle() {
	e_float64 ret;
	int state = pause_loop();
	ret = hl_turntable_get_angle(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #8
0
e_int32 lm_turntable_fast_turn(e_float64 angle) {
	int ret, state;
	state = pause_loop();
	ret = hl_turntable_fast_turn(lm->lc, angle);
	resume_loop(state);
	return ret;
}
예제 #9
0
//相机拍照
e_int32 lm_camera_take_photo() {
	int ret, state;
	state = pause_loop();
	ret = hl_camera_take_photo(lm->lc);
	resume_loop(state);
	return ret;
}
예제 #10
0
//设置转台参数//设置旋转速度,区域
e_int32 lm_turntable_config(e_uint32 plus_delay, e_float64 start, e_float64 end) {
	int ret, state;
	state = pause_loop();
	ret = hl_turntable_config(lm->lc, plus_delay, start, end);
	resume_loop(state);
	return ret;
}
예제 #11
0
//开始工作
e_int32 lm_turntable_prepare(e_float64 pre_start_angle) {
	int ret, state;
	state = pause_loop();
	ret = hl_turntable_prepare(lm->lc, pre_start_angle);
	resume_loop(state);
	return ret;
}
예제 #12
0
//LED熄灭
e_int32 lm_led_off() {
	int ret, state;
	state = pause_loop();
	ret = hl_led_off(lm->lc);
	lm->LED = 0;
	resume_loop(state);
	return ret;
}
예제 #13
0
//亮绿灯
e_int32 lm_led_green() {
	int ret, state;
	state = pause_loop();
	ret = hl_led_green(lm->lc);
	lm->LED = 1;
	resume_loop(state);
	return ret;
}
예제 #14
0
/* called on vertical interrupt.
 * Allow the core to perform various things */
void new_vi(void)
{
   gs_apply_cheats();

   main_check_inputs();

#if 0
   timed_sections_refresh();

   pause_loop();

   apply_speed_limiter();
#endif
}
예제 #15
0
파일: loop.c 프로젝트: linehan/barnacle
/*
 * render_cb 
 *
 * Called by the rendering loop, which is the tightest of the event loops. 
 * It writes any modified state to the screen, and tries not to calculate much
 * itself, since it has to return quickly.
 * Repeat: .02 seconds
 */
void render_cb(EV_P_ ev_timer *w, int revents)
{
        spin_render_loop();

        if (game_is_paused)
                pause_loop();

        tick();

        free_nouns();
        update_nouns();

        dock_update();

        print_dock();
        update_map_control();
        update_panels();  /* Were slowing down performance, unnecessary */
        doupdate();
        MAPBOOK->restack(ACTIVE);
        map_refresh(ACTIVE);

        ev_timer_again(EV_DEFAULT, w);
}
예제 #16
0
e_int32 lm_stop_status_monitor() {
	e_assert(lm->state, E_ERROR_INVALID_PARAMETER);
	pause_loop();
	lm->lc = NULL;
	return E_OK;
}