diff --git a/core/frontend/src/one-more-time.ts b/core/frontend/src/one-more-time.ts index fe07c1239a..bf67e7ccd9 100644 --- a/core/frontend/src/one-more-time.ts +++ b/core/frontend/src/one-more-time.ts @@ -70,7 +70,7 @@ export class OneMoreTime { const id = setInterval(() => { // Check if object does not exist anymore or if it was destroyed by vue // eslint-disable-next-line - if (!ref.deref() || ref.deref()._isDestroyed) { + if (!ref.deref() || (ref.deref() as any)._isDestroyed) { this.stop() clearInterval(id) } @@ -131,7 +131,7 @@ export class OneMoreTime { } // Celebrate and dance so free - [Symbol.dispose](): void { + [(Symbol as any).dispose](): void { this.stop() } diff --git a/core/frontend/src/style/colors/blue_robotics.js b/core/frontend/src/style/colors/blue_robotics.ts similarity index 100% rename from core/frontend/src/style/colors/blue_robotics.js rename to core/frontend/src/style/colors/blue_robotics.ts diff --git a/core/frontend/src/style/colors/default.js b/core/frontend/src/style/colors/default.ts similarity index 100% rename from core/frontend/src/style/colors/default.js rename to core/frontend/src/style/colors/default.ts diff --git a/core/frontend/src/style/colors/vuetify.js b/core/frontend/src/style/colors/vuetify.js deleted file mode 100644 index f4246e35b7..0000000000 --- a/core/frontend/src/style/colors/vuetify.js +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable */ -module.exports = { - VUETIFY_PRIMARY: '#1976D2', - VUETIFY_SECONDARY: '#424242', - VUETIFY_ACCENT: '#82B1FF', - VUETIFY_SUCCESS: '#4CAF50', - VUETIFY_ERROR: '#FF5252', - VUETIFY_INFO: '#2196F3', - VUETIFY_WARNING: '#e0a600', -} diff --git a/core/frontend/src/types/autopilot/parameter-table.ts b/core/frontend/src/types/autopilot/parameter-table.ts index 0ac3d47c60..c86ffc5e13 100644 --- a/core/frontend/src/types/autopilot/parameter-table.ts +++ b/core/frontend/src/types/autopilot/parameter-table.ts @@ -148,7 +148,7 @@ export default class ParametersTable { console.log(`ignoring ${name} : ${parameter}`) continue } - this.metadata[name] = parameter + this.metadata[name] = (parameter as Metadata) } } } diff --git a/core/frontend/src/types/shims-general.ts b/core/frontend/src/types/shims-general.ts index 984a241bb5..94d6cc10ce 100644 --- a/core/frontend/src/types/shims-general.ts +++ b/core/frontend/src/types/shims-general.ts @@ -1,25 +1,13 @@ declare module '*.svg' { const value: string - export default value } declare module '*.jpg' { const value: string - export default value } declare module '*.png' { const value: string - export default value } -declare module '*.glb' { - const value: string - export default value -} - -declare module 'vue-tooltip-directive' - -declare module '@/assets/colors/default' -declare module '@/assets/colors/blue_robotics' -declare module '@/assets/colors/vuetify' +declare module 'vue-tooltip-directive' \ No newline at end of file diff --git a/core/frontend/src/utils/ardupilot_mavlink.ts b/core/frontend/src/utils/ardupilot_mavlink.ts index 9d35e2a401..7fee10040c 100644 --- a/core/frontend/src/utils/ardupilot_mavlink.ts +++ b/core/frontend/src/utils/ardupilot_mavlink.ts @@ -81,10 +81,9 @@ export function getMode(): number { } export async function setMode(mode: number, tries?: number): Promise { - tries = tries || 5 let current_try = 0 return new Promise(async (resolve, reject) => { - while (getMode() !== mode && current_try < tries) { + while (getMode() !== mode && current_try < (tries ?? 5)) { current_try += 1 mavlink2rest.sendCommandLong( MavCmd.MAV_CMD_DO_SET_MODE,