Skip to content

Commit

Permalink
add min/max functions to mymavextra, add autocomplement for them
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Jul 15, 2024
1 parent 4a4bd46 commit 6755bb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/PlotSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export default {
additionalCompletionItems () {
const additionalCompletionItems = [
'mag_heading_df(MAG[0],ATT)',
'mag_heading(RAW_IMU,ATTITUDE)'
'mag_heading(RAW_IMU,ATTITUDE)',
'max(x,y)',
'min(x,y)'
]
for (const name of this.state.namedFloats) {
additionalCompletionItems.push(`named(NAMED_VALUE_FLOAT,"${name}")`)
Expand Down
3 changes: 3 additions & 0 deletions src/mavextra/mymavextra.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ window.angle_diff = (angle1, angle2) => {
}
return ret
}

window.min = Math.min
window.max = Math.max

0 comments on commit 6755bb9

Please sign in to comment.