Skip to content
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

frontend: parameter-table: allow using metadata override #2983

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/frontend/src/types/autopilot/parameter-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ export default class ParametersTable {
}

async fetchArduPilotMetadata(): Promise<MetadataFile | string> {
try {
const json_metadata_override = '/userdata/metadata_override.json'
const metadata = await axios.get(json_metadata_override).then(response => response.data as MetadataFile)
console.info(`Using metadata override from ${json_metadata_override}`)
return metadata
} catch (error) {
console.debug(`Metadata override not present`)
}
await fetchFirmwareVehicleType() // required to populate autopilot.vehicle_type
const jsons = Object.keys(await import.meta.glob('/public/assets/ArduPilot-Parameter-Repository/**/*.json')) as string[]
let folder = "Copter"
Expand Down
Loading