Skip to content

Fixed issues of first applications run #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 1, 2024
15 changes: 6 additions & 9 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ function BlackboxLogViewer() {
});

workspaceSelection = new WorkspaceSelection($(".log-workspace-selection"), workspaceGraphConfigs, onSwitchWorkspace, onSaveWorkspace);
onSwitchWorkspace(workspaceGraphConfigs, workspaceSelection);
onSwitchWorkspace(workspaceGraphConfigs, activeWorkspace);

prefs.get('log-legend-hidden', function(item) {
if (item) {
Expand Down Expand Up @@ -2163,11 +2163,11 @@ function BlackboxLogViewer() {
});

prefs.get('graphConfig', function(item) {
graphConfig = GraphConfig.load(item);

if (!graphConfig && flightLog) {
if (item) {
graphConfig = GraphConfig.load(item);
} else if (flightLog) {
graphConfig = GraphConfig.getExampleGraphConfigs(flightLog, ["Motors", "Gyros"]);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

});

// New workspaces feature; local storage of user configurations
Expand All @@ -2177,8 +2177,6 @@ function BlackboxLogViewer() {
} else {
workspaceGraphConfigs = defaultWorkspaceGraphConfigs;
}

onSwitchWorkspace(workspaceGraphConfigs, activeWorkspace);
});

prefs.get('activeWorkspace', function (id){
Expand All @@ -2188,9 +2186,8 @@ function BlackboxLogViewer() {
else {
activeWorkspace = 1
}

onSwitchWorkspace(workspaceGraphConfigs, activeWorkspace);
});
onSwitchWorkspace(workspaceGraphConfigs, activeWorkspace);

// Get the offsetCache buffer
prefs.get('offsetCache', function(item) {
Expand Down