suu pen
/
HonyBeePropoIR_TestProgram
IRC Helicopter "HonyBee" Propo decode test program
Embed:
(wiki syntax)
Show/hide line numbers
CodecHonyBee.h
00001 /** 00002 * Codec IR Propo of HonyBee common class 00003 * Version 0.0 130623 00004 * 00005 * Writer:suupen 00006 */ 00007 00008 #ifndef _CODECHonyBee_H_ 00009 #define _CODECHonyBee_H_ 00010 00011 #include <mbed.h> 00012 00013 00014 00015 class CodecHonyBee { 00016 public: 00017 00018 typedef struct{ 00019 uint8_t count; 00020 uint8_t band; // 1 to 255 00021 float slottle; // 0(min) to 1.0(max) 00022 float ladder; // -1.0(Left) to 1.0(Right) 00023 float elevator; // not use (-1.0(backward) to 1.0(forward)) 00024 float trim; // -1.0 to 1.0 00025 } normalizePropo_t; 00026 00027 00028 00029 typedef struct{ 00030 uint8_t count; // recive count [1/1 [recive]/count] 00031 uint8_t band; // 0x0a:A band 0x0b:B 0x0c:C 00032 uint8_t slottle; // 0x00:0 - 0x0e:14 00033 uint8_t trim; // 0x0f:Left 0x01:Right 0x00:neutral 00034 int8_t ladder; // -3:Left3 -2:Left2 -1:Left1 0:Neutral 1:Right1 2:Right2 3:Right3 00035 } honyBeePropo_t; 00036 00037 00038 static const uint8_t BAND_A = 0x00; 00039 static const uint8_t BAND_B = 0x01; 00040 static const uint8_t BAND_C = 0x02; 00041 00042 static const uint8_t SLOTTLE_MIN = 0x00; 00043 static const uint8_t SLOTTLE_MAX = 0x0e; 00044 00045 //static const int8_t TRIM_MIN = 0; 00046 //static const int8_t TRIM_MAX = 0x0f; 00047 static const int8_t TRIM_LEFT = 15; 00048 static const int8_t TRIM_RIGHT = 1; 00049 static const int8_t TRIM_NEUTRAL = 0; 00050 00051 static const int8_t LADDER_MIN = -3; 00052 static const int8_t LADDER_MAX = 3; 00053 00054 #if 0 // not use 00055 static const int8_t ELEVATOR_MIN = -15; 00056 static const int8_t ELEVATOR_MAX = 15; 00057 #endif 00058 00059 private: 00060 00061 CodecHonyBee(); 00062 00063 00064 }; 00065 00066 #endif 00067 00068 00069 00070 00071 00072
Generated on Fri Jul 15 2022 02:33:45 by 1.7.2