File tree 1 file changed +4
-15
lines changed
core/frontend/src/components/autopilot
1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change 3
3
class =" v-card v-sheet theme--light mt-5"
4
4
>
5
5
<v-combobox
6
- v-for =" port in Object.keys(port_map )"
6
+ v-for =" port in range(1, 9 )"
7
7
:key =" port"
8
8
v-model =" ports[port]"
9
9
:items =" available_ports"
10
- :label =" `${port_map[ port] }`"
10
+ :label =" `Serial ${ port}`"
11
11
:rules =" [isValidEndpoint]"
12
12
:loading =" current_serial_ports.isEmpty()"
13
13
outlined
65
65
</template >
66
66
67
67
<script lang="ts">
68
+ import { range } from ' lodash'
68
69
import Vue from ' vue'
69
70
70
71
import * as AutopilotManager from ' @/components/autopilot/AutopilotManagerUpdater'
@@ -86,19 +87,6 @@ export default Vue.extend({
86
87
},
87
88
data() {
88
89
return {
89
- // Portmap is used to deal with ardupilots weird mapping situation
90
- // Note that the mapping is not linear
91
- port_map: {
92
- // A (Serial 0) is reserved
93
- C: ' Serial 1' ,
94
- D: ' Serial 2' ,
95
- B: ' Serial 3' ,
96
- E: ' Serial 4' ,
97
- F: ' Serial 5' ,
98
- G: ' Serial 6' ,
99
- H: ' Serial 7' ,
100
- I: ' Serial 8' ,
101
- },
102
90
ports: {} as Dictionary <string | undefined >,
103
91
fetch_autopilot_serial_config_task: new OneMoreTime ({ delay: 10000 , disposeWith: this }),
104
92
fetch_serial_task: new OneMoreTime ({ delay: 10000 , disposeWith: this }),
@@ -144,6 +132,7 @@ export default Vue.extend({
144
132
}
145
133
}
146
134
},
135
+ range ,
147
136
async saveAndRestart(): Promise <void > {
148
137
await back_axios ({
149
138
method: ' put' ,
You can’t perform that action at this time.
0 commit comments