Warning if ground AMSL differs from altitudes#191
Conversation
vasarhelyi
left a comment
There was a problem hiding this comment.
Just a few small comments from a UI perspective, as an "outsider" to JS/TS code...
| uav.errors.includes(UAVErrorCode.ON_GROUND) || | ||
| uav.errors.includes(UAVErrorCode.MOTORS_RUNNING_WHILE_ON_GROUND) | ||
| ) { | ||
| return true; |
There was a problem hiding this comment.
I would exclude drones that have some severe error. Basically any error code >= 128 (see https://docs.skybrush.io/public/skybrush-protocol-spec/latest/errors.html)
| return false; | ||
| } | ||
|
|
||
| // Fall back to AHL only when the UAV does not provide a more explicit state. |
There was a problem hiding this comment.
What has the AHL got to do with our AMSL warning? It should not be related... Why do we need this extra possibility to return true? The on ground status codes are not enough?
| return false; | ||
| } | ||
|
|
||
| return selectGroundAMSLWarning(state) ? Status.WARNING : Status.SUCCESS; |
There was a problem hiding this comment.
I would not disable further items in the show control panel, the warning is enough, this is not an error and there could be use cases when one wants to have a different AMSL on purpose.
Fixes #185.