stores: video: Send MAVLink message when starting or stopping recording#2420
stores: video: Send MAVLink message when starting or stopping recording#2420patrickelectric wants to merge 1 commit intobluerobotics:masterfrom
Conversation
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
d62d5b0 to
22c4eb2
Compare
rafaellehmkuhl
left a comment
There was a problem hiding this comment.
I would ask you to use a try/catch block in this case instead of the chained catch. That's because the sendCommandLong method is a deeply nested method and if any of its internal calls (or from its nested methods) throws synchronously before returning the promise (a.k.a any implementation error there), we would not continue the execution (which I understand do not exist right now, besides the alert pushing, but end up being added latter).
It ends up being a one line change but with the benefit of not having to closely monitor changes here in the future.
|
|
||
| activeStreams.value[streamName]!.mediaRecorder!.stop() | ||
|
|
||
| mainVehicle.value?.sendCommandLong(MavCmd.MAV_CMD_VIDEO_STOP_CAPTURE, 0, 0).catch((error) => { |
There was a problem hiding this comment.
If this isn't going to handle individual cameras and streams, it should at least have a TODO comment about doing so. At the moment starting or stopping one recording at the surface would start or stop all the recordings in the vehicle, which is unlikely to be what the user expects (even if it's at least closer to their expectations than the current approach of always recording everything while armed).
Fix #734