mavschema.xsd - max, min, increment on fields#811
mavschema.xsd - max, min, increment on fields#811peterbarker merged 1 commit intoArduPilot:masterfrom
Conversation
|
@peterbarker Pretty please? |
|
I'm a bit concerned by the proposed uses. We've found with ArduPilot parameters that people often need to set parameters to values outside the expected range (sometimes as technology changes, sometimes as weird implementations are created). Absolutely constraining the input values (as MissionPlanner does in many interfaces!) causes people grief. OTOH, this is a UI issue rather than a standards thing. minValue/MaxValue also tend to suffer when flag values are also in play. I'm going to merge this anyway as the "make it orthogonal" argument seems to be compelling. |
|
@peterbarker Thanks very much. Generally we design parameter end points with a particular set of use cases in mind. If someone says this doesn't work we probably missed that use case and need to reevaluate. But either way, it is always possible to make a range bigger, but it is bloody hard to push the genie back in the bottle. The problem here will be if we start using these for existing APIs where these changes have already happened. In that case we'll have a bit of churn possibly if there is enforcement. We'll have no choice but to expand them then. But I'd rather know. |
For exactly the same reason that they are useful on parameters it would useful to have max, min, increment on fields - i.e. to restrict values as displayed in the UI and to make it easier to enforce ranges and test ranges in messages.
FYI @peterbarker @amilcarlucas , a high level view on the current schema is shown below prior to this PR. Are there any that we should have in both other than these? I don't think so, except possibly for decimalPlaces (not in any hurry to add it)
Another change we might make is to restrict some of these on
enum- i.e. you shouldn't specify units if you have an enum and so on. I don't see it as a risk, but as a nice to have. OK?MAV_CMD
attributes
wip | deprecated | superseded (?)
description
param (7)
MESSAGE
ENUM