added CreatePacket Example
This commit is contained in:
parent
c48963a153
commit
2dd3112a7e
1 changed files with 11 additions and 0 deletions
|
|
@ -30,3 +30,14 @@ func ExampleCreateCamera() {
|
||||||
fmt.Printf("Failed to take a picture: %s\n", err)
|
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)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue