LP-597 Progress bar for GCS log replay

Merged
#511 · Created  · Last updated

Merged pull request

Merged in Oblivium/librepilot/LP-597_Progress_bar_for_GCS_log_replay (pull request #511)

2f075df·Author: ·Closed by: ·2018-09-29

Description

  • LP-597 Progress bar for GCS log replay - add progress bar and a stop button

    • Added stop button:

    • start: starts from 0 position after stop signal, resumes from current position after pause signal.

    • pause: freezes at current position, also freezes scopes.

    • stop: stops replay and resets start position to 0 (does not close the logfile)

    • Creates an index of the timestamp positions in the logfile for quick seeking to the target position in the log.

    • Start, End and current position timestamps are visible in the GUI below the position slider.

    • Determine replay position by moving the position slider

    • Update position label while changing position bar

    • Speed widget: lowest multiplier is now 0.1 instead of 0. Only set one decimal of precision. More decimals seem useless at this time.

  • LP-597 Progress bar for GCS log replay - ensure the index vectors are emptied before adding elements to them. Caused problem when replaying multiple logfiles successively.

    • Bugfix: ensure the index vectors are emptied before adding elements to them. Caused problem when replaying multiple logfiles successively.

    • extra validations while indexing the logfile

    • Define TIMESTAMP_SIZE_BYTES and use that instead of the hardcoded timestamp size of 4 bytes.

    • modify variable case: updateBeginAndEndtimes -> updateBeginAndEndTimes

    • improve qWarning messages for logfile.cpp: add the name of the function because we read the logfile in two separate functions.

  • LP-597 Progress bar for GCS log replay - Resize playPause and stop buttons according to the available space for the widget.

    • also make pretty

  • LP-597 again 3 separate buttons + various fixes & cleanups

Suggested by Philippe Renon: - change the combined play-pause button to separate play and pause buttons. Hide button irrelevant button. Code has been simplified as a result.

Fixes: - fix situation where replay is stopped/paused and logfile is disconnected through the Disconnect button. - remove unneeded stuff (resizing related) - rename updateBeginAndEndTimes -> setBeginAndEndTimes - less base height needed for the widget - wordwrap for "Playback speed" label. Wraps when space constrains. - set a fixed width for statusLabel to prevent jumping around when the text changes - Update the statusLabel to "Paused" when stopped/paused. - rename enableButtons -> enableWidgets - clear start and end text labels when playback has finished.

  • LP-597 Don't disable playback when the end of the logfile has been reached.

  • instead, do the same as the user pressing the stop button.

Examples:

 

 

 

0 attachments

0 comments

Loading commits...