@@ -438,12 +438,6 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, craftCanvas, options)
438438 frameLabelTextWidthFrameTime = canvasContext . measureText ( "00:00.000" ) . width ;
439439
440440 canvasContext . fillText ( formatTime ( timeMsec , true ) , canvas . width - frameLabelTextWidthFrameTime - 8 , canvas . height - 8 - drawingParams . fontSizeFrameLabel - 8 ) ;
441- // update time field on toolbar
442- // $(".graph-time").val(formatTime(timeMsec, true));
443- // if(hasMarker) {
444- // $(".graph-time-marker").val(formatTime(timeMsec-markerTime, true));
445- // }
446-
447441
448442 }
449443
@@ -641,6 +635,9 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, craftCanvas, options)
641635 case FlightLogEvent . FLIGHT_MODE :
642636 drawEventLine ( x , labelY , "Flight Mode Change" + eventToFriendly ( event . data . newFlags , event . data . lastFlags ) , "rgba(0,0,255,0.75)" , 3 ) ;
643637 break ;
638+ case FlightLogEvent . CUSTOM : // Virtual Events shown in RED
639+ drawEventLine ( x , labelY , ( event . label ) ?event . label :'EVENT' , "rgba(255,0,0,0.75)" , 3 ) ;
640+ break ;
644641 default :
645642 drawEventLine ( x ) ;
646643 }
@@ -677,6 +674,19 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, craftCanvas, options)
677674 }
678675 }
679676 }
677+
678+ // Add custom markers
679+
680+ // Draw Marker Event Line
681+ var markerEvent = blackboxLogViewer . getMarker ( ) ;
682+ if ( markerEvent != null ) {
683+ if ( markerEvent . state ) drawEvent (
684+ {
685+ event :FlightLogEvent . CUSTOM ,
686+ time :markerEvent . time ,
687+ label :'Marker:' + formatTime ( ( markerEvent . time - flightLog . getMinTime ( ) ) / 1000 , true )
688+ } , sequenceNum ++ ) ;
689+ }
680690 }
681691
682692 /**
@@ -838,7 +848,7 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, craftCanvas, options)
838848
839849 // Draw events
840850 drawEvents ( chunks ) ;
841-
851+
842852 // Draw details at the current time
843853 var
844854 centerFrame = flightLog . getSmoothedFrameAtTime ( windowCenterTime ) ;
0 commit comments