Added LOGIN constant

This commit is contained in:
Jonas Köritz 2019-09-11 18:15:01 +02:00
parent 13d8ad5b0a
commit 2fa6afbfbd
2 changed files with 2 additions and 1 deletions

View file

@ -30,6 +30,7 @@ type Camera struct {
type MessageHandler func(camera *Camera, message *Message) (bool, error)
const (
LOGIN = 0x0110
LOGIN_ACCEPT = 0x0111
START_PREVIEW = 0x01FF
REQUEST_FILE_LIST = 0xA025

View file

@ -61,7 +61,7 @@ func CreateCommandHeader(command uint32) Header {
// CreateLoginPacket creates a Login packet to be sent to the camera
func CreateLoginPacket(username, password string) []byte {
header := CreateCommandHeader(0x00000110) // Login
header := CreateCommandHeader(LOGIN) // Login
payload := make([]byte, 128)
copy(payload, []byte(username))
copy(payload[64:], []byte(password))