added CreatePacket Example

This commit is contained in:
Jonas Köritz 2019-09-11 18:32:50 +02:00
parent c48963a153
commit 2dd3112a7e

View file

@ -30,3 +30,14 @@ func ExampleCreateCamera() {
fmt.Printf("Failed to take a picture: %s\n", err)
}
}
func ExampleCreatePacket() {
// Prepare a Header
header := CreateCommandHeader(TAKE_PICTURE)
payload := []byte{}
// Create the packet
packet := CreatePacket(header, payload)
fmt.Printf("Packet Data: %X\n", packet)
}