Skip to content

Commit

Permalink
frontend: lights: allows setting lights to any channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Feb 20, 2025
1 parent 44e4a3d commit c4be223
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Here you can configure what pin outputs the signal for the first set of lights.
<v-select
v-model="lights1_new_param"
:items="recommended_params"
:items="servo_params"
:item-text="friendlyName"
:item-value="'name'"
label="Lights 1"
Expand All @@ -19,7 +19,7 @@
What pin outputs the signal for the second set of lights.
<v-select
v-model="lights2_new_param"
:items="recommended_params"
:items="servo_params"
:item-text="friendlyName"
:item-value="'name'"
label="Lights 2"
Expand Down Expand Up @@ -69,13 +69,6 @@ export default {
light_steps(): Parameter | undefined {
return autopilot_data.parameter('JS_LIGHTS_STEPS')
},
recommended_params(): Parameter[] {
// return parameters in servo_params that are on channel 9 and higher
return this.servo_params.filter((param) => {
const servoNumber = parseInt(param.name.replace('SERVO', '').split('_')[0], 10)
return servoNumber >= 9
})
},
servo_params(): Parameter[] {
return autopilot_data.parameterRegex('SERVO[0-9]+_FUNCTION')
},
Expand Down

0 comments on commit c4be223

Please sign in to comment.