# IRremoteESP8266: src/ir_Magiquest.h Source File

ir_Magiquest.h
Go to the documentation of this file.
// Copyright 2013 mpflaga
// Copyright 2015 kitlaan
// Copyright 2017 Jason kendall, David Conran
// Supports:
// Brand: MagiQuest, Model: Wand
#ifndef IR_MAGIQUEST_H_
#define IR_MAGIQUEST_H_
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#include "IRremoteESP8266.h"
#include "IRsend.h"
union magiquest {
uint64_t llword;
uint8_t byte[8];
// uint16_t word[4];
uint32_t lword[2];
struct {
uint16_t magnitude;
uint32_t wand_id;
uint8_t padding;
uint8_t scrap;
} cmd;
};
const uint16_t kMagiQuestTotalUsec = 1150;
const uint8_t kMagiQuestZeroRatio = 30; // usually <= ~25%
const uint8_t kMagiQuestOneRatio = 38; // usually >= ~50%
const uint16_t kMagiQuestMarkZero = 280;
const uint16_t kMagiQuestSpaceZero = 850;
const uint16_t kMagiQuestMarkOne = 580;
const uint16_t kMagiQuestSpaceOne = 600;
const uint32_t kMagiQuestGap = kDefaultMessageGap; // Just a guess.
#endif // IR_MAGIQUEST_H_
kDefaultMessageGap
const uint32_t kDefaultMessageGap
Definition: IRsend.h:41
magiquest::scrap
uint8_t scrap
Definition: ir_Magiquest.h:31
kMagiQuestMarkZero
const uint16_t kMagiQuestMarkZero
Definition: ir_Magiquest.h:38
IRsend.h
magiquest::magnitude
uint16_t magnitude
Definition: ir_Magiquest.h:28
magiquest::llword
uint64_t llword
Definition: ir_Magiquest.h:23
IRremoteESP8266.h
kMagiQuestMarkOne
const uint16_t kMagiQuestMarkOne
Definition: ir_Magiquest.h:40
magiquest
MagiQuest packet is both Wand ID and magnitude of swish and flick.
Definition: ir_Magiquest.h:22
magiquest::wand_id
uint32_t wand_id
Definition: ir_Magiquest.h:29
kMagiQuestGap
const uint32_t kMagiQuestGap
Definition: ir_Magiquest.h:42
kMagiQuestSpaceZero
const uint16_t kMagiQuestSpaceZero
Definition: ir_Magiquest.h:39
kMagiQuestSpaceOne
const uint16_t kMagiQuestSpaceOne
Definition: ir_Magiquest.h:41
magiquest::lword
uint32_t lword[2]
Definition: ir_Magiquest.h:26
kMagiQuestTotalUsec
const uint16_t kMagiQuestTotalUsec
Definition: ir_Magiquest.h:35
magiquest::cmd
struct magiquest::@52 cmd
magiquest::padding
uint8_t padding
Definition: ir_Magiquest.h:30
kMagiQuestOneRatio
const uint8_t kMagiQuestOneRatio
Definition: ir_Magiquest.h:37
kMagiQuestZeroRatio
const uint8_t kMagiQuestZeroRatio
Definition: ir_Magiquest.h:36