// Token: 0x06000132 RID: 306 RVA: 0x0000D81C File Offset: 0x0000BA1C private static void objCameraDest(MTS_TASK_TCB pTcb) { obj_camera_tcb = null; obj_camera_sys = null; OBS_CAMERA_SYS obs_CAMERA_SYS = (OBS_CAMERA_SYS)pTcb.work; for (int i = 0; i < 8; i++) { if (obs_CAMERA_SYS.obj_camera[i] != null) { object user_work = obs_CAMERA_SYS.obj_camera[i].user_work; } } }
public static int Init(int cam_id, NNS_VECTOR pos, int group, ushort pause_level, int prio) { OBS_CAMERA_SYS cameraSys = new OBS_CAMERA_SYS(); if (obj_camera_tcb == null) { obj_camera_tcb = AppMain.MTM_TASK_MAKE_TCB(objCameraMain, objCameraDest, 0U, pause_level, (uint)prio, group, () => new OBS_CAMERA_SYS(), "objCamera"); cameraSys = (OBS_CAMERA_SYS)obj_camera_tcb.work; cameraSys.Clear(); obj_camera_sys = cameraSys; } else { cameraSys = obj_camera_sys; } if (cameraSys.camera_num >= 8) { return(-1); } int i; if (cam_id < 0) { for (i = 0; i < 8; i++) { if (cameraSys.obj_camera[i] == null) { break; } } } else { if (cameraSys.obj_camera[cam_id] != null) { return(-1); } i = cam_id; } if (i >= 8) { return(-1); } if (cameraSys.obj_camera[i] != null) { return(-1); } cameraSys.obj_camera[i] = new OBS_CAMERA(); cameraSys.camera_num++; OBS_CAMERA obs_CAMERA = cameraSys.obj_camera[i]; obs_CAMERA.camera_id = i; obs_CAMERA.command_state = 0U; obs_CAMERA.spd_max.x = 16f; obs_CAMERA.spd_max.y = 16f; obs_CAMERA.spd_max.z = 4f; obs_CAMERA.spd_add.x = 3f; obs_CAMERA.spd_add.y = 3f; obs_CAMERA.spd_add.z = 0.5f; obs_CAMERA.shift = 1; obs_CAMERA.limit[0] = 8; obs_CAMERA.limit[1] = 8; obs_CAMERA.limit[2] = obs_CAMERA.limit[0] + (int)AppMain.OBD_LCD_X; obs_CAMERA.limit[3] = obs_CAMERA.limit[1] + (int)AppMain.OBD_LCD_Y; obs_CAMERA.limit[4] = -4096; obs_CAMERA.limit[5] = 4096; obs_CAMERA.pos.Assign(pos); obs_CAMERA.prev_pos.Assign(pos); obs_CAMERA.disp_pos.Assign(pos); obs_CAMERA.prev_disp_pos.Assign(pos); return(i); }