Skip to content

Commit

Permalink
Components: Cockpit-settings-manager: Implement component
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <[email protected]>
  • Loading branch information
ArturoManzoli committed Feb 11, 2025
1 parent f2db9cf commit 6617c9f
Show file tree
Hide file tree
Showing 4 changed files with 574 additions and 17 deletions.
93 changes: 93 additions & 0 deletions src/assets/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import {
WidgetType,
} from '@/types/widgets'

import {
availableGamepadToCockpitMaps,
cockpitStandardToProtocols,
defaultProtocolMappingVehicleCorrespondency,
} from './joystick-profiles'

export const defaultRovProfileHash = 'c2bcf04d-048f-496f-9d78-fc4002608028'
export const defaultBoatProfileHash = 'adb7d856-f2e5-4980-aaeb-c39c1fa3562b'
export const defaultMavProfileHash = '2309ffda-896a-449d-a171-7b7fdf80bc95'
Expand Down Expand Up @@ -901,3 +907,90 @@ export const defaultSensorDataloggerProfile: OverlayGrid = {
export const defaultDisplayUnitPreferences = {
distance: DistanceDisplayUnit.Meters,
}

export const defaultCockpitSettings = {
'cockpit-current-view-index': 0,
'cockpit-has-seen-tutorial': false,
'cockpit-auto-process-videos': true,
'cockpit-slide-events-enabled': true,
'cockpit-last-mission-name': null,
'cockpit-default-map-center': [-27.5935, -48.55854],
'cockpit-saved-profiles-v8': widgetProfiles,
'cockpit-slide-events-categories-required': {
'Arm': true,
'Disarm': true,
'Takeoff': true,
'Altitude Change': true,
'Land': true,
'Goto': true,
},
'cockpit-enabled-alert-levels': [
{ level: 'info', enabled: false },
{ level: 'success', enabled: true },
{ level: 'error', enabled: true },
{ level: 'warning', enabled: true },
{ level: 'critical', enabled: true },
],
'cockpit-mission-start-time': '2025-02-10T21:34:50.113Z',
'cockpit-current-profile-index': 0,
'cockpit-streams-correspondency': [],
'cockpit-allowed-stream-protocols': [],
'cockpit-username': null,
'cockpit-standard-mappings-v2': availableGamepadToCockpitMaps,
'cockpit-datalogger-log-interval': 1000,
'cockpit-enable-blueos-settings-sync': true,
'cockpit-jitter-buffer-target': 0,
'cockpit-default-vehicle-type-protocol-mappings': defaultProtocolMappingVehicleCorrespondency,
'cockpit-vehicle-custom-main-connection-uri': {
data: 'ws://blueos-avahi.local/mavlink2rest/ws/mavlink',
enabled: false,
},
'cockpit-last-tutorial-step': 1,
'cockpit-hold-last-joystick-input-when-window-hidden': false,
'cockpit-unprocessed-video-info': {},
'cockpit-enable-usage-statistics-telemetry': true,
'cockpit-default-map-zoom': 15,
'cockpit-zip-multiple-video-files': false,
'cockpit-enable-system-logging': true,
'cockpit-selected-alert-speech-voice': 'Google US English',
'cockpit-custom-rtc-config': {
data: {
bundlePolicy: 'max-bundle',
iceServers: [],
},
enabled: false,
},
'cockpit-protocol-mapping-index-v1': 0,
'cockpit-main-menu-style': 'center-left',
'cockpit-prevent-auto-vehicle-discovery-dialog': false,
'cockpit-datalogger-overlay-grid': defaultSensorDataloggerProfile,
'cockpit-enable-voice-alerts': true,
'cockpit-mini-widgets-profile-v4': miniWidgetsProfile,
'cockpit-mini-widget-last-values': {},
'cockpit-vehicle-custom-webrtc-signalling-uri': {
data: 'ws://blueos-avahi.local:6021/',
enabled: false,
},
'cockpit-reset-just-made': false,
'cockpit-display-unit-preferences': defaultDisplayUnitPreferences,
'cockpit-ui-glass-effect': defaultUIGlassColor,
'cockpit-default-vehicle-type-profiles': defaultProfileVehicleCorrespondency,
'cockpit-actions-joystick-confirm-required': {},
'cockpit-allowed-stream-ips': [],
'cockpit-enable-auto-ice-ip-fetch': true,
'cockpit-protocol-mappings-v1': cockpitStandardToProtocols,
'cockpit-datalogger-overlay-options': {
fontSize: 30,
fontColor: '#FFFFFFFF',
backgroundColor: '#000000FF',
fontOutlineColor: '#000000FF',
fontOutlineSize: 2,
fontShadowColor: '#000000FF',
fontShadowSize: 1,
fontBold: false,
fontItalic: false,
fontUnderline: false,
fontStrikeout: false,
},
'cockpit-vehicle-address': 'blueos-avahi.local',
}
Loading

0 comments on commit 6617c9f

Please sign in to comment.