IRremoteESP8266
ir_Magiquest.h
Go to the documentation of this file.
1 // Copyright 2013 mpflaga
2 // Copyright 2015 kitlaan
3 // Copyright 2017 Jason kendall, David Conran
4 
9 
10 // Supports:
11 // Brand: MagiQuest, Model: Wand
12 
13 #ifndef IR_MAGIQUEST_H_
14 #define IR_MAGIQUEST_H_
15 
16 #define __STDC_LIMIT_MACROS
17 #include <stdint.h>
18 #include "IRremoteESP8266.h"
19 #include "IRsend.h"
20 
22 union magiquest {
23  uint64_t llword;
24  uint8_t byte[8];
25  // uint16_t word[4];
26  uint32_t lword[2];
27  struct {
28  uint16_t magnitude;
29  uint32_t wand_id;
30  uint8_t padding;
31  uint8_t scrap;
32  } cmd;
33 };
34 
35 const uint16_t kMagiQuestTotalUsec = 1150;
36 const uint8_t kMagiQuestZeroRatio = 30; // usually <= ~25%
37 const uint8_t kMagiQuestOneRatio = 38; // usually >= ~50%
38 const uint16_t kMagiQuestMarkZero = 280;
39 const uint16_t kMagiQuestSpaceZero = 850;
40 const uint16_t kMagiQuestMarkOne = 580;
41 const uint16_t kMagiQuestSpaceOne = 600;
42 const uint32_t kMagiQuestGap = kDefaultMessageGap; // Just a guess.
43 #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::cmd
struct magiquest::@76 cmd
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::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