-
Notifications
You must be signed in to change notification settings - Fork 0
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 support for generic payloads #3
base: master
Are you sure you want to change the base?
Add support for generic payloads #3
Conversation
Reviews in this chain: |
|
112e1ab
to
91451e4
Compare
<entry value="404" name="MAV_CMD_GENERIC_PAYLOAD_ON_OFF" hasLocation="false" isDestination="false"> | ||
<description>Allows for ON and OFF control for a generic payload.</description> | ||
<param index="1" label="Enable" minValue="0" maxValue="1" increment="1">0: Generic payload OFF, 1: Generic payload ON</param> | ||
</entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<entry value="404" name="MAV_CMD_GENERIC_PAYLOAD_ON_OFF" hasLocation="false" isDestination="false"> | |
<description>Allows for ON and OFF control for a generic payload.</description> | |
<param index="1" label="Enable" minValue="0" maxValue="1" increment="1">0: Generic payload OFF, 1: Generic payload ON</param> | |
</entry> | |
<entry value="404" name="MAV_CMD_GENERIC_PAYLOAD_DIGITAL_INPUT" hasLocation="false" isDestination="false"> | |
<param index="1" label="Index/Pin" minValue="0" maxValue="1" increment="1">Index of Pin/Sub-Component</param> | |
<param index="2" label="Set Point" minValue="0" maxValue="1" increment="1">0: LOW/OFF 1: HI/ON</param> | |
</entry> |
Is there a world where we would like a component to be able to advertise multiple binary switches. this could be for like say Arming a parachute and then Deploying a parachute. We could achieve this with indexing the Input/Outputs
GENERIC_PAYLOAD_STATUS
could have overall payload status, and then we'd have another message say GENERIC_PAYLOAD_DIGITAL_STATUS
which carries the set point of the index/pin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI for primary/secondary/tertiary switches could be discovered based on GENERIC_PAYLOAD_DIGITAL_STATUS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this is a great idea. I just changed the naming slightly since I wasn't sure if DIGITAL_INPUT would get the idea across. Reviewed the rest with @amy-chen-skydio. Happy to get your input!
91451e4
to
c5f7ed2
Compare
<message id="398" name="GENERIC_PAYLOAD_STATUS"> | ||
<description>Generic payload status.</description> | ||
<field type="uint32_t" name="uptime_ms" units="ms">Time since the start-up of the generic payload in ms</field> | ||
<field type="uint8_t" name="enable">0: Generic payload OFF, 1: Generic payload ON</field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we either need this message to have an index field to correspon to the FUNCTIONS_CONTROL message, or if this is communicating the payload power on/off then we need to have another separate message to publish the status of the FUNCTIONS_CONTROL state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomas-watters-skydio Uploaded changes to include a new function status message. Let me know what you think! :)
- Add `MAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL`, `GENERIC_PAYLOAD_STATUS`,`GENERIC_PAYLOAD_FUNCTION_STATUS`, and `GENERIC_PAYLOAD_ERROR_FLAGS` to development.xml `GENERIC_PAYLOAD_STATUS` is the status for the generic payload, and `GENERIC_PAYLOAD_FUNCTION_STATUS` is the status for individual function(s) of the generic payload that can be controlled via `MAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL`. `MAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL` is used to control payload functions. It can be used for simple control such as ON/OFF of a flashlight. It can also be used to control multiple functions of a component such as arm/disarm and deployment of a parachute. Topic: generic_payload
c5f7ed2
to
7b83b10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
MAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL
,GENERIC_PAYLOAD_STATUS
,GENERIC_PAYLOAD_FUNCTION_STATUS
, andGENERIC_PAYLOAD_ERROR_FLAGS
to development.xmlGENERIC_PAYLOAD_STATUS
is the status for the generic payload, andGENERIC_PAYLOAD_FUNCTION_STATUS
is the status for individual function(s) of the generic payload that can be controlled viaMAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL
.MAV_CMD_GENERIC_PAYLOAD_FUNCTIONS_CONTROL
is used to control payload functions. It can be used for simple control such as ON/OFF of a flashlight. It can also be used to control multiple functions of a component such as arm/disarm and deployment of a parachute.Topic: generic_payload