static void update_indicator_lamps (void) { entity *en; en = get_gunship_entity (); blackhawk_lamps.indicator_lamp_1 = get_current_flight_dynamics_rotor_brake (); blackhawk_lamps.indicator_lamp_2 = get_current_flight_dynamics_overtorque (); blackhawk_lamps.indicator_lamp_3 = get_current_flight_dynamics_low_rotor_rpm (); blackhawk_lamps.indicator_lamp_4 = get_current_flight_dynamics_wheel_brake (); blackhawk_lamps.indicator_lamp_5 = get_current_flight_dynamics_auto_pilot (); blackhawk_lamps.indicator_lamp_6 = get_current_flight_dynamics_auto_hover (); blackhawk_lamps.indicator_lamp_7 = get_local_entity_int_value (en, INT_TYPE_RADAR_ON); blackhawk_lamps.indicator_lamp_8 = get_local_entity_int_value (en, INT_TYPE_RADAR_JAMMER_ON); blackhawk_lamps.indicator_lamp_9 = get_local_entity_int_value (en, INT_TYPE_INFRA_RED_JAMMER_ON); }
void update_kiowa_lamp_avionics (void) { entity *en; en = get_gunship_entity (); update_master_caution (); //////////////////////////////////////// kiowa_lamps.engine_ignition = !get_dynamics_damage_type (DYNAMICS_DAMAGE_LEFT_ENGINE) && current_flight_dynamics->left_engine_rpm.value > 0.01; kiowa_lamps.apu_ignition = current_flight_dynamics->apu_rpm.value > 0.01; kiowa_lamps.engine_fire = get_dynamics_damage_type (DYNAMICS_DAMAGE_LEFT_ENGINE_FIRE); kiowa_lamps.apu_fire = 0; kiowa_lamps.engine_fire_extinguiser = fire_extinguisher_used; kiowa_lamps.hydraulic_pressure = get_dynamics_damage_type (DYNAMICS_DAMAGE_LOW_HYDRAULICS); kiowa_lamps.oil_pressure = get_dynamics_damage_type (DYNAMICS_DAMAGE_LOW_OIL_PRESSURE) || get_dynamics_damage_type (DYNAMICS_DAMAGE_HIGH_OIL_PRESSURE); kiowa_lamps.oil_temperature = 0; kiowa_lamps.overtorque = get_current_flight_dynamics_overtorque (); kiowa_lamps.rotor_rpm = get_current_flight_dynamics_low_rotor_rpm (); kiowa_lamps.fuel_low = current_flight_dynamics->fuel_weight.value < (current_flight_dynamics->fuel_weight.max * 0.25); kiowa_lamps.rotor_brake = get_current_flight_dynamics_rotor_brake (); kiowa_lamps.navigation_lights = get_local_entity_int_value (en, INT_TYPE_LIGHTS_ON); kiowa_lamps.hover_hold = get_current_flight_dynamics_auto_hover (); kiowa_lamps.altitude_hold = get_current_flight_dynamics_altitude_lock (); kiowa_lamps.auto_pilot = get_current_flight_dynamics_auto_pilot (); kiowa_lamps.laser = get_local_entity_int_value (en, INT_TYPE_LASER_ON); kiowa_lamps.ir_jammer = get_local_entity_int_value (en, INT_TYPE_INFRA_RED_JAMMER_ON); kiowa_lamps.auto_counter_measures = get_global_auto_counter_measures (); kiowa_lamps.ase_auto_page = get_global_ase_auto_page (); kiowa_lamps.co_pilot_main_mfd_focus = get_kiowa_main_mfd_has_focus (KIOWA_MAIN_MFD_LOCATION_CO_PILOT); kiowa_lamps.pilot_main_mfd_focus = get_kiowa_main_mfd_has_focus (KIOWA_MAIN_MFD_LOCATION_PILOT); }
static void update_status_panel_lamps (void) { hind_lamps.status_1 = hind_damage.radar; hind_lamps.status_2 = hind_damage.flir; hind_lamps.status_3 = hind_damage.llltv; hind_lamps.status_4 = hind_damage.laser_range_finder; hind_lamps.status_5 = hind_damage.radar_jammer; hind_lamps.status_6 = hind_damage.infra_red_jammer; hind_lamps.status_7 = hind_damage.navigation_computer; hind_lamps.status_8 = hind_damage.communications; hind_lamps.status_9 = hind_damage.radar_warning_system; hind_lamps.status_10 = hind_damage.head_up_display; hind_lamps.status_11 = hind_damage.helmet_mounted_sight; hind_lamps.status_12 = hind_damage.tv_display; hind_lamps.status_13 = hind_damage.threat_warning_display; hind_lamps.status_14 = hind_damage.night_vision_goggles; hind_lamps.status_15 = fire_extinguisher_used; hind_lamps.status_16 = get_current_flight_dynamics_rotor_brake (); hind_lamps.status_17 = get_current_flight_dynamics_wheel_brake (); hind_lamps.status_18 = get_global_auto_counter_measures (); }
void update_hokum_lamp_avionics (void) { entity *en; int gear_state; en = get_gunship_entity (); update_master_caution (); //////////////////////////////////////// gear_state = get_local_entity_undercarriage_state (en); gear_transition_timer -= get_delta_time (); if (gear_transition_timer <= 0.0) { gear_transition_state ^= 1; gear_transition_timer = GEAR_TRANSITION_FLASH_RATE; } //////////////////////////////////////// hokum_lamps.left_engine_fire = get_dynamics_damage_type (DYNAMICS_DAMAGE_LEFT_ENGINE_FIRE); hokum_lamps.apu_fire = 0; hokum_lamps.right_engine_fire = get_dynamics_damage_type (DYNAMICS_DAMAGE_RIGHT_ENGINE_FIRE); hokum_lamps.fire_extinguiser = fire_extinguisher_used; hokum_lamps.hydraulic_pressure = get_dynamics_damage_type (DYNAMICS_DAMAGE_LOW_HYDRAULICS); hokum_lamps.oil_pressure = get_dynamics_damage_type (DYNAMICS_DAMAGE_LOW_OIL_PRESSURE) || get_dynamics_damage_type (DYNAMICS_DAMAGE_HIGH_OIL_PRESSURE); hokum_lamps.oil_temperature = 0; hokum_lamps.overtorque = get_current_flight_dynamics_overtorque (); hokum_lamps.rotor_rpm = get_current_flight_dynamics_low_rotor_rpm (); hokum_lamps.fuel_low = current_flight_dynamics->fuel_weight.value < (current_flight_dynamics->fuel_weight.max * 0.25); hokum_lamps.rotor_brake = get_current_flight_dynamics_rotor_brake (); hokum_lamps.wheel_brake = get_current_flight_dynamics_wheel_brake (); hokum_lamps.navigation_lights = get_local_entity_int_value (en, INT_TYPE_LIGHTS_ON); hokum_lamps.hover_hold = get_current_flight_dynamics_auto_hover (); hokum_lamps.altitude_hold = get_current_flight_dynamics_altitude_lock (); hokum_lamps.auto_pilot = get_current_flight_dynamics_auto_pilot (); hokum_lamps.radar = get_local_entity_int_value (en, INT_TYPE_RADAR_ON); hokum_lamps.laser = get_local_entity_int_value (en, INT_TYPE_LASER_ON); hokum_lamps.radar_jammer = get_local_entity_int_value (en, INT_TYPE_RADAR_JAMMER_ON); hokum_lamps.ir_jammer = get_local_entity_int_value (en, INT_TYPE_INFRA_RED_JAMMER_ON); hokum_lamps.auto_counter_measures = get_global_auto_counter_measures (); hokum_lamps.ase_auto_page = get_global_ase_auto_page (); hokum_lamps.gear_damaged = get_dynamics_damage_type (DYNAMICS_DAMAGE_UNDERCARRIAGE); switch (gear_state) { //////////////////////////////////////// case AIRCRAFT_UNDERCARRIAGE_UP: //////////////////////////////////////// { hokum_lamps.gear_status = 1; hokum_lamps.gear_red = 1; break; } //////////////////////////////////////// case AIRCRAFT_UNDERCARRIAGE_LOWERING: //////////////////////////////////////// { hokum_lamps.gear_status = gear_transition_state; hokum_lamps.gear_red = 0; break; } //////////////////////////////////////// case AIRCRAFT_UNDERCARRIAGE_DOWN: //////////////////////////////////////// { hokum_lamps.gear_status = 1; hokum_lamps.gear_red = 0; break; } //////////////////////////////////////// case AIRCRAFT_UNDERCARRIAGE_RAISING: //////////////////////////////////////// { hokum_lamps.gear_status = gear_transition_state; hokum_lamps.gear_red = 1; break; } } hokum_lamps.pilot_lh_mfd_focus = get_hokum_mfd_has_focus (HOKUM_MFD_LOCATION_PILOT_LHS); hokum_lamps.pilot_rh_mfd_focus = get_hokum_mfd_has_focus (HOKUM_MFD_LOCATION_PILOT_RHS); hokum_lamps.co_pilot_lh_mfd_focus = get_hokum_mfd_has_focus (HOKUM_MFD_LOCATION_CO_PILOT_LHS); hokum_lamps.co_pilot_rh_mfd_focus = get_hokum_mfd_has_focus (HOKUM_MFD_LOCATION_CO_PILOT_RHS); }