- // temporary
- // extern bool fgAPAltitudeEnabled( void );
- // extern bool fgAPHeadingEnabled( void );
- // extern bool fgAPWayPointEnabled( void );
- // extern char *fgAPget_TargetDistanceStr( void );
- // extern char *fgAPget_TargetHeadingStr( void );
- // extern char *fgAPget_TargetAltitudeStr( void );
- // extern char *fgAPget_TargetLatLonStr( void );
-
- int apY = 480 - 80;
- // char scratch[128];
- // HUD_TextList.add( fgText( "AUTOPILOT", 20, apY) );
- // apY -= 15;
- if( current_autopilot->get_HeadingEnabled() ) {
- HUD_TextList.add( fgText( 40, apY,
- current_autopilot->get_TargetHeadingStr()) );
- apY -= 15;
- }
- if( current_autopilot->get_AltitudeEnabled() ) {
- HUD_TextList.add( fgText( 40, apY,
- current_autopilot->get_TargetAltitudeStr()) );
- apY -= 15;
- }
- if( current_autopilot->get_HeadingMode() ==
- FGAutopilot::FG_HEADING_WAYPOINT )
- {
- char *wpstr;
- wpstr = current_autopilot->get_TargetWP1Str();
- if ( strlen( wpstr ) ) {
- HUD_TextList.add( fgText( 40, apY, wpstr ) );
- apY -= 15;
- }
- wpstr = current_autopilot->get_TargetWP2Str();
- if ( strlen( wpstr ) ) {
- HUD_TextList.add( fgText( 40, apY, wpstr ) );
- apY -= 15;
- }
- wpstr = current_autopilot->get_TargetWP3Str();
- if ( strlen( wpstr ) ) {
- HUD_TextList.add( fgText( 40, apY, wpstr ) );
- apY -= 15;
- }
- }
+ case HUD_BRT_MEDIUM:
+ set_hud_color (0.1f, 0.7f, 0.0f);
+ break;
+
+ case HUD_BRT_DARK:
+ set_hud_color (0.0f, 0.6f, 0.0f);
+ break;
+
+ case HUD_BRT_BLACK:
+ set_hud_color( 0.0f, 0.0f, 0.0f);
+ break;
+
+ default:
+ set_hud_color (0.1f, 0.9f, 0.1f);
+ }
+ } else {
+ if( global_day_night_switch == HUD_NIGHT) {
+ switch (HUD_deque[0]->get_brightness())
+ {
+ case HUD_BRT_LIGHT:
+ set_hud_color (0.9f, 0.1f, 0.1f);
+ break;
+
+ case HUD_BRT_MEDIUM:
+ set_hud_color (0.7f, 0.0f, 0.1f);
+ break;
+
+ case HUD_BRT_DARK:
+ set_hud_color (0.6f, 0.0f, 0.0f);
+ break;
+
+ case HUD_BRT_BLACK:
+ set_hud_color( 0.0f, 0.0f, 0.0f);
+ break;
+
+ default:
+ set_hud_color (0.6f, 0.0f, 0.0f);
+ }
+ } else { // Just in case default
+ set_hud_color (0.1f, 0.9f, 0.1f);
+ }
+ }
+
+ for_each(HUD_deque.begin(), HUD_deque.end(), HUDdraw());
+
+ HUD_TextList.add( fgText(40, 10, get_formated_gmt_time(), 0) );
+
+
+ int apY = 480 - 80;
+
+
+ if (strcmp( heading_enabled->getStringValue(), "dg-heading-hold") == 0 ) {
+ snprintf( hud_hdg_text, 256, "hdg = %.1f\n",
+ fgGetDouble("/autopilot/settings/heading-bug-deg") );
+ HUD_TextList.add( fgText( 40, apY, hud_hdg_text ) );
+ apY -= 15;
+ } else if ( strcmp(heading_enabled->getStringValue(), "true-heading-hold") == 0 ) {
+ snprintf( hud_hdg_text, 256, "hdg = %.1f\n",
+ fgGetDouble("/autopilot/settings/true-heading-deg") );
+ HUD_TextList.add( fgText( 40, apY, hud_hdg_text ) );
+ apY -= 15;
+
+ string wp0_id = fgGetString( "/autopilot/route-manager/wp[0]/id" );
+ if ( wp0_id.length() > 0 ) {
+ snprintf( hud_wp0_text, 256, "%5s %6.1fnm %s", wp0_id.c_str(),
+ fgGetDouble( "/autopilot/route-manager/wp[0]/dist" ),
+ fgGetString( "/autopilot/route-manager/wp[0]/eta" ) );
+ HUD_TextList.add( fgText( 40, apY, hud_wp0_text ) );
+ apY -= 15;
+ }
+ string wp1_id = fgGetString( "/autopilot/route-manager/wp[1]/id" );
+ if ( wp1_id.length() > 0 ) {
+ snprintf( hud_wp1_text, 256, "%5s %6.1fnm %s", wp1_id.c_str(),
+ fgGetDouble( "/autopilot/route-manager/wp[1]/dist" ),
+ fgGetString( "/autopilot/route-manager/wp[1]/eta" ) );
+ HUD_TextList.add( fgText( 40, apY, hud_wp1_text ) );
+ apY -= 15;
+ }
+ string wp2_id = fgGetString( "/autopilot/route-manager/wp-last/id" );
+ if ( wp2_id.length() > 0 ) {
+ snprintf( hud_wp2_text, 256, "%5s %6.1fnm %s", wp2_id.c_str(),
+ fgGetDouble( "/autopilot/route-manager/wp-last/dist" ),
+ fgGetString( "/autopilot/route-manager/wp-last/eta" ) );
+ HUD_TextList.add( fgText( 40, apY, hud_wp2_text ) );
+ apY -= 15;
+ }
+ }