Skip to content

Commit

Permalink
Frontend: Parameter Loader: show reboot button on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Feb 19, 2025
1 parent 44e4a3d commit eacc9f5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
>
Write Parameters
</v-btn>
<RebootButton v-if="error" />
</v-card-actions>
</v-card>
</v-dialog>
Expand All @@ -149,12 +150,16 @@
import Vue, { PropType } from 'vue'
import { Dictionary } from 'vue-router'
import RebootButton from '@/components/utils/RebootButton.vue'
import mavlink2rest from '@/libs/MAVLink2Rest'
import autopilot_data from '@/store/autopilot'
import { printParamWithUnit } from '@/types/autopilot/parameter'
export default Vue.extend({
name: 'ParameterLoader',
components: {
RebootButton,
},
props: {
parameters: {
type: Object as PropType<Dictionary<number>> | undefined,
Expand Down Expand Up @@ -251,6 +256,9 @@ export default Vue.extend({
writeSelectedParams() {
for (const [name, value] of Object.entries(this.user_selected_params)) {
this.writeParam(name, value)
if (autopilot_data.parameter(name)?.rebootRequired) {
autopilot_data.setRebootRequired(true)
}
}
},
writeParam(name: string, value: number) {
Expand Down

0 comments on commit eacc9f5

Please sign in to comment.