Skip to content

Conversation

@rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Sep 9, 2025

Adds two initial alerts for BlueOS: high CPU usage and high CPU temperature.

Both alerts are configurable. The user can change the threshold as well as the minimum interval between alerts in the alerts config menu. Both alerts can also be completely disabled, if desired.

The idea with this PR is that the user can know when the BlueOS CPU is acting abnormal, so they can take providences.

image

Copy link
Contributor

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool idea!

I think the interface is a little unclear at the moment. In particular:

  1. Do the voice settings still apply for the BlueOS alerts?
  2. Are the "Alert levels" actually "MAVLink alert levels"? Or "Autopilot alert levels"?
    • Should this be in its own collapsible section?

More generally, could we:

  1. Move the alert voice selector up to beside the "enable voice alerts" toggle?
  2. Compress the BlueOS alerts, either into a single row each, or by moving the CPU usage alert config into a column to the right of the temperature alert?

<ExpansiblePanel :is-expanded="false">
<template #title>BlueOS monitoring alerts:</template>
<template #info>
Configure alerts for BlueOS system monitoring including CPU temperature and usage thresholds. <br />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configure alerts for BlueOS system monitoring including CPU temperature and usage thresholds. <br />
Configure alerts for BlueOS system monitoring, including CPU temperature and usage thresholds. <br />

@patrickelectric
Copy link
Member

related to: mavlink/mavlink#2347

@rafaellehmkuhl
Copy link
Member Author

Cool idea!

I think the interface is a little unclear at the moment. In particular:

  1. Do the voice settings still apply for the BlueOS alerts?

  2. Are the "Alert levels" actually "MAVLink alert levels"? Or "Autopilot alert levels"?

    • Should this be in its own collapsible section?

More generally, could we:

  1. Move the alert voice selector up to beside the "enable voice alerts" toggle?
  2. Compress the BlueOS alerts, either into a single row each, or by moving the CPU usage alert config into a column to the right of the temperature alert?

All good points!

Voice settings still apply and alert levels are "cockpit" alert levels, so they apply to everything, including the BlueOS and MAVLink ones. We should mention that the BlueOS ones are at Warning level, so it's more clear.

We should also indeed better separate the categories, so it is clear those are general settings. Will work on that tomorrow.

@rafaellehmkuhl
Copy link
Member Author

@ES-Alexander what do you think about this?

image

@ArturoManzoli
Copy link
Contributor

ArturoManzoli commented Sep 16, 2025

Interface review:

  • You can stick to the v-checkbox instead of the standard input tag with checkbox prop, so we keep consistency on the checkbox element.
  • We should use the <v-select /> on its theme="dark" mode whenever we can. his way we also keep size and color consistency
checkbox_dropdown

Comment on lines +53 to +63
<select
v-model="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].level"
class="px-2 py-1 rounded-sm bg-[#FFFFFF22] text-sm w-24"
:disabled="!vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].enabled"
>
<option value="success">Success</option>
<option value="info">Info</option>
<option value="warning">Warning</option>
<option value="error">Error</option>
<option value="critical">Critical</option>
</select>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use v-select on dark mode as a standard to keep UI consistency

Comment on lines +24 to +28
<input
v-model="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].enabled"
type="checkbox"
class="w-4 h-4"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the v-checkbox as on the elements below to keep UI consistency

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed an 'add icon' to include a secondary alert on a different severity.
This way users can receive a warning at 60º C and a critical at 90º C, for example.

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same way the checkboxes and select inputs, the number inputs should also be using the vuetify elements whenever possible. Those standard <input number /> are very handy on tight UI spaces, where the vuetify component has too many visual elements to be displayed.

<td class="py-3 text-center">
<div class="flex items-center justify-center gap-2">
<input
v-model.number="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].threshold"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure if this is the correct approach to do that, the system-information page has the /platform endpoint where it returns platform specific data, in this case, for the raspberry, it returns the events such as thermal throttle, under voltage, and others.
For a complete list, check here:
https://github.com/patrickelectric/linux2rest/blob/master/src/features/platform/raspberry.rs#L10

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I like the idea of implementing the undervoltage and throttling warns as well.

About allowing customization of the threshold for those that have continuous values, it is needed since each platform behaves differently, and the user will know better than anyone what is a safe level for their mission and when they need to be warned to take action.

@rafaellehmkuhl
Copy link
Member Author

I missed an 'add icon' to include a secondary alert on a different severity.
This way users can receive a warning at 60º C and a critical at 90º C, for example.

This actually gave me an idea. I will modify the PR to allow the user to create their own alerts from any variable, not just BlueOS ones.

@rafaellehmkuhl
Copy link
Member Author

Closed in favor of #2305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants