Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filltered voltage warning switch #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/assets/tooltips.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@
"text": "Set to the value received by your tx or in the OSD view with a full lipo"
},
"voltage.vbattlow": {
"text": "Set the desired voltage to trigger a warning, single cell voltage is used Default 3.3V (uses Fuel gauge volts)",
"text": "Set the desired voltage to trigger a warning, single cell voltage is used Default 3.3V (uses Fuel gauge volts by default)",
"link": "https://docs.bosshobby.com/Features/#voltage"
},
"voltage.use_filtered_voltage_for_warnings": {
"text": "Use filtered voltage instead Fuel gauge volts for Warnings"
}
}
27 changes: 27 additions & 0 deletions src/panel/Voltage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,33 @@
</div>
</div>
</div>

<div class="field is-horizontal" v-if="profile.profileVersionGt('0.2.2')">
<div class="field-label">
<label class="label">
Filtered voltage warnings
<tooltip entry="voltage.use_filtered_voltage_for_warnings" />
</label>
</div>
<div class="field-body">
<div class="field">
<div class="control is-expanded">
<input
type="checkbox"
class="switch"
id="use_filtered_voltage_for_warnings"
:checked="profile.voltage.use_filtered_voltage_for_warnings || 0"
@change="profile.voltage.use_filtered_voltage_for_warnings = profile.voltage.use_filtered_voltage_for_warnings ? 0 : 1"
/>
<label
class="py-0"
style="height: 2em"
for="use_filtered_voltage_for_warnings"
></label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export interface profile_voltage_t {
vbattlow: number;
actual_battery_voltage: number;
reported_telemetry_voltage: number;
use_filtered_voltage_for_warnings: number;
vbat_scale: number;
ibat_scale: number;
}
Expand Down