Beispiel #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;
}
Beispiel #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;
}
Beispiel #3
0
//以最快速度调整到指定水平范围起始角
e_int32 lm_search_zero() {
	int ret, state;
	state = pause_loop();
	ret = hl_search_zero(lm->lc);
	resume_loop(state);
	return ret;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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;
}
Beispiel #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
}
Beispiel #15
0
/*
 * 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);
}
Beispiel #16
0
e_int32 lm_stop_status_monitor() {
	e_assert(lm->state, E_ERROR_INVALID_PARAMETER);
	pause_loop();
	lm->lc = NULL;
	return E_OK;
}