-
Notifications
You must be signed in to change notification settings - Fork 63
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
Video: Send VIDEO_STREAM_INFORMATION to GCS #201
Conversation
Converting to draft because I realized it's going to be mandatory to have a way to select the network interface and therefore, which URI gets sent in the VIDEO_STREAM_INFORMATION message. The only way to send multiple URIs would be to send multiple messages (i.e., one to every interface), which seems kludgy. This would work fine if the URI was hardcoded to one interface (or all interfaces), but there are plenty of use cases where a user would want to choose. |
Nice! When you're ready, happy to give it test and review. |
5eb591d
to
0b1d961
Compare
@stephendade, please review when you have time. Thank you! Thanks to @TyIsI for helping with tips to get this working as well. |
Great! Looks like you'll need a rebase first, as some of my recent tlogging changes aren't in here. |
a287ac6
to
47ddedf
Compare
@stephendade I had a bit of fight with git but I believe it is all up to date now. |
Yes, that look up to date now. I should have some time in the next few days to review. |
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.
Looks pretty good. Some minor formatting issues and the user needs a bit more information about the service.
src/video.js
Outdated
@@ -186,6 +194,12 @@ class VideoPage extends basePage { | |||
<input disabled={this.state.streamingStatus} type="number" name="fps" min="1" max={this.state.FPSMax} step="1" onChange={this.handleFPSChange} value={this.state.fpsSelected} />fps (max: {this.state.FPSMax}) | |||
</div> | |||
</div> | |||
<div className="form-group row" style={{ marginBottom: '5px' }}> |
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.
<br />
<h3>MAVLink Video Streaming Service</h3>
<p><i>Configuration for advertising the video stream via MAVLink. See <a href='https://mavlink.io/en/services/camera.html#video_streaming'>here</a> for details.</i></p>
<div className="form-group row" style={{ marginBottom: '5px' }}>
<label className="col-sm-4 col-form-label">Video source IP Address</label>
<div className="col-sm-8">
<Select isDisabled={this.state.streamingStatus} onChange={this.handleMavStreamChange} options={this.state.ifaces.map((item, index) => ({ value: index, label: item}))} value={this.state.mavStreamSelected} />
</div>
</div>
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.
Also needs the "Stream Configuration" header changed to h3 to match here
mavlink/mavManager.js
Outdated
} else if ( data.targetSystem === this.targetSystem && | ||
data.targetComponent == minimal.MavComponent.ONBOARD_COMPUTER && | ||
packet.header.msgid === common.CommandLong.MSG_ID | ||
){ |
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.
Space between brackets
@@ -100,6 +100,14 @@ class mavManager { | |||
|
|||
// send off initial messages | |||
this.sendVersionRequest() | |||
|
|||
// Respond to MavLink commands that are targeted to the companion computer |
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.
Remove any extraneous trailing whitespaces from this section
Addresses feature request stephendade#169. Enables Rpanion to respond to send COMMAND_ACK and VIDEO_STREAM_INFORMATION messages via MAVLink in response to a MAV_CMD_REQUEST_MESSAGE. Adds a React Select dropdown to the Video page to select which IP will be transmitted as part of the video stream URI that is sent in the MAVLink message.
Thanks for the review. I fixed the whitespace issues in mavManager.js and confirmed it didn't give any warnings with npm run lint. Added your suggestion for the Video page layout also--appreciate that input as I wasn't sure how to integrate the new option. |
Looks good! Merging... |
Addresses feature request issue #169
Enables Rpanion to respond to send COMMAND_ACK and VIDEO_STREAM_INFORMATION messages via MavLink in response to a MAV_CMD_REQUEST_MESSAGE.