Skip to content

Commit

Permalink
[Rec] Fixed "Recording" display bug and some other bugs (#1598)
Browse files Browse the repository at this point in the history
The bugs were caused from changing bit-wise | and & to boolean versions, which caused the latter functions to not be evaluated. Turning around the parameter fixes the issue too, without bit-wise operators (those are prone to warnings)
  • Loading branch information
FlorianReimold committed May 16, 2024
1 parent 2047642 commit 8a44741
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ void JobHistoryModel::setRecorderStatuses(const eCAL::rec_server::RecorderStatus
if (hdf5_recorder_item == nullptr) continue;

bool update_needed_hdf5_rec = false;
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateStillOnline (recorder_still_online);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updatePid (pid);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateInfoLastCommandResponse(client_job_status.second.info_last_command_response_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateLength ({ client_job_status.second.job_status_.rec_hdf5_status_.total_length_, client_job_status.second.job_status_.rec_hdf5_status_.total_frame_count_ });
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateUnflushedFrameCount (client_job_status.second.job_status_.rec_hdf5_status_.unflushed_frame_count_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateState (client_job_status.second.job_status_.state_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateUploadStatus (client_job_status.second.job_status_.upload_status_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateInfo (client_job_status.second.job_status_.rec_hdf5_status_.info_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateIsDeleted (is_deleted);
update_needed_hdf5_rec = hdf5_recorder_item->updateStillOnline (recorder_still_online) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updatePid (pid) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateInfoLastCommandResponse(client_job_status.second.info_last_command_response_) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateLength ({ client_job_status.second.job_status_.rec_hdf5_status_.total_length_, client_job_status.second.job_status_.rec_hdf5_status_.total_frame_count_ }) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateUnflushedFrameCount (client_job_status.second.job_status_.rec_hdf5_status_.unflushed_frame_count_) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateState (client_job_status.second.job_status_.state_) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateUploadStatus (client_job_status.second.job_status_.upload_status_) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateInfo (client_job_status.second.job_status_.rec_hdf5_status_.info_) || update_needed_hdf5_rec;
update_needed_hdf5_rec = hdf5_recorder_item->updateIsDeleted (is_deleted) || update_needed_hdf5_rec;

if (update_needed_hdf5_rec)
{
Expand Down Expand Up @@ -216,13 +216,13 @@ void JobHistoryModel::setRecorderStatuses(const eCAL::rec_server::RecorderStatus
}

bool update_needed_addon = false;
update_needed_addon = update_needed_addon || addon_item->updateStillOnline (addon_still_online);
update_needed_addon = update_needed_addon || addon_item->updatePid (pid);
update_needed_addon = update_needed_addon || addon_item->updateLength ({std::chrono::steady_clock::duration(0), addon_id_status_pair.second.total_frame_count_ });
update_needed_addon = update_needed_addon || addon_item->updateUnflushedFrameCount(addon_id_status_pair.second.unflushed_frame_count_);
update_needed_addon = update_needed_addon || addon_item->updateState (addon_state);
update_needed_addon = update_needed_addon || addon_item->updateInfo (addon_id_status_pair.second.info_);
update_needed_addon = update_needed_addon || addon_item->updateIsDeleted (is_deleted);
update_needed_addon = addon_item->updateStillOnline (addon_still_online) || update_needed_addon;
update_needed_addon = addon_item->updatePid (pid) || update_needed_addon;
update_needed_addon = addon_item->updateLength ({std::chrono::steady_clock::duration(0), addon_id_status_pair.second.total_frame_count_ }) || update_needed_addon;
update_needed_addon = addon_item->updateUnflushedFrameCount(addon_id_status_pair.second.unflushed_frame_count_) || update_needed_addon;
update_needed_addon = addon_item->updateState (addon_state) || update_needed_addon;
update_needed_addon = addon_item->updateInfo (addon_id_status_pair.second.info_) || update_needed_addon;
update_needed_addon = addon_item->updateIsDeleted (is_deleted) || update_needed_addon;

if (update_needed_addon)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ bool WaitForShutdownDialog::updateAllFields()
auto job_history = QEcalRec::instance()->jobHistory();

bool safe_to_exit = true;
safe_to_exit = safe_to_exit && updateWaitForFlushing();
safe_to_exit = safe_to_exit && updateBuiltInRecorderUploading(job_history);
safe_to_exit = safe_to_exit && updateBuiltInFtpServer();
safe_to_exit = safe_to_exit && updateNonUploadedMeasurements();
safe_to_exit = updateWaitForFlushing() && safe_to_exit;
safe_to_exit = updateBuiltInRecorderUploading(job_history) && safe_to_exit;
safe_to_exit = updateBuiltInFtpServer() && safe_to_exit;
safe_to_exit = updateNonUploadedMeasurements() && safe_to_exit;

updateItIsSafeToExit(safe_to_exit);

Expand Down
6 changes: 3 additions & 3 deletions app/rec/rec_server_cli/src/ecal_rec_server_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,9 +1568,9 @@ bool IsRecorderBusy(bool print_status)
std::cout << "Waiting for the following events:" << std::endl;

bool still_busy = false;
still_busy = still_busy || IsAnyClientFlushing (print_status);
still_busy = still_busy || IsAnyClientUploading (print_status);
still_busy = still_busy || IsBuiltInFtpServerBusy(print_status);
still_busy = IsAnyClientFlushing (print_status) || still_busy;
still_busy = IsAnyClientUploading (print_status) || still_busy;
still_busy = IsBuiltInFtpServerBusy(print_status) || still_busy;

if (print_status && !still_busy)
{
Expand Down

0 comments on commit 8a44741

Please sign in to comment.