22-mapOfCommandsToMethodsForDrone

command
v0.0.0-...-9882766 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

The UDP stream received from the drone specifying what command to use will look like this: []byte{1, 4, 6, 0, 66, 170, 134, 60, 21, 152, 181, 189, 131, 170, 224, 191} where the first 3 values {1,4,06} is a reference to what this command is, and the following bytes are the payload (arguments) for that command.

What needs to be solved ? Since all the various commands received from the drone will be made as it's own type in the code with a decode method attached, we need to be able to look up what decode method to use for a specific command definition.

This test is a concept to create a map to decode all the commands received, and find the corresponding decode method to execute and decode the arguments in the payload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL