2020-08-19, 11:02 PM
(This post was last modified: 2020-08-19, 11:14 PM by emilecantin.
Edit Reason: clarification
)
(2020-08-19, 02:44 AM)seandepagnier Wrote: mostly i'm just ranting because I had zero input on the spec and it seems to be based on existing nmea2000 autopilots... so... don't take it too critically.
So I suggest basic keys for:
mode -- compass, gps, wind, true wind
command -- the command for the above mode. I don't like having separate keys for each mode's command it seems redundant to me and just more work for each client interface to deal with.
enabled -- I guess this could be rolled into the mode but I suggest it isn't so the mode can be known or changed even when the autopilot is off.
this is really the basics, only 3 keys needed. command can move the motor when not enabled.
Looking at the published spec (https://signalk.org/specification/1.4.0/...gautopilot), it looks like we're not that far from your suggestions:
We have:
- autopilot.state: missing enum values, but would conceivably be something like "enabled", "disabled", "error", etc., mapping to your "enabled" proposal
- autopilot.mode: again missing enum values, but would map to the values you mention
- autopilot.target: that's where it diverts; it's using different sub-keys for different value "types", but you would presumably only look at the pertinent one depending on the mode you're in.
Other than these main three, we also have:
- autopilot.deadZone
- autopilot.backlash
- autopilot.gain
- autopilot.maxDriveCurrent
- autopilot.maxDriveRate
- autopilot.portLock
- autopilot.starboardLock