completed AC decode parsing
This commit is contained in:
BIN
src/example/decode_example/CC26xx/IAR.zip
Normal file
BIN
src/example/decode_example/CC26xx/IAR.zip
Normal file
Binary file not shown.
@@ -120,6 +120,7 @@ UINT16 ir_ac_lib_control(remote_ac_status_t ac_status, UINT16 *user_data, UINT8
|
|||||||
BOOL change_wind_direction)
|
BOOL change_wind_direction)
|
||||||
{
|
{
|
||||||
UINT16 time_length = 0;
|
UINT16 time_length = 0;
|
||||||
|
|
||||||
#if defined BOARD_PC
|
#if defined BOARD_PC
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -140,37 +140,6 @@ static decode_control_block dccb =
|
|||||||
.decoded_length = 0,
|
.decoded_length = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
// const for test
|
|
||||||
const uint8_t source_code[] =
|
|
||||||
{
|
|
||||||
0x1D,0x00,0x00,0x09,0x00,0x10,0x00,0x18,0x00,0x23,0x00,0x26,0x00,0xFF,0xFF,0x27,
|
|
||||||
0x00,0x2F,0x00,0x43,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x49,0x00,0xFF,0xFF,0xFF,
|
|
||||||
0xFF,0xFF,0xFF,0x5B,0x00,0x83,0x00,0xA3,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x2F,
|
|
||||||
0x01,0xFF,0xFF,0xFF,0xFF,0x30,0x01,0xFF,0xFF,0x43,0x01,0x39,0x30,0x30,0x30,0x2C,
|
|
||||||
0x34,0x35,0x30,0x30,0x36,0x34,0x35,0x2C,0x35,0x34,0x31,0x36,0x34,0x35,0x2C,0x31,
|
|
||||||
0x36,0x38,0x30,0x34,0x26,0x36,0x34,0x35,0x2C,0x32,0x30,0x37,0x30,0x30,0x31,0x39,
|
|
||||||
0x37,0x31,0x30,0x30,0x30,0x32,0x30,0x30,0x30,0x31,0x30,0x39,0x34,0x39,0x30,0x30,
|
|
||||||
0x32,0x30,0x35,0x30,0x30,0x32,0x31,0x31,0x32,0x30,0x30,0x30,0x36,0x30,0x30,0x32,
|
|
||||||
0x30,0x31,0x30,0x31,0x30,0x38,0x30,0x35,0x31,0x30,0x30,0x43,0x30,0x31,0x30,0x33,
|
|
||||||
0x30,0x35,0x30,0x37,0x30,0x41,0x30,0x33,0x30,0x35,0x30,0x38,0x30,0x31,0x30,0x33,
|
|
||||||
0x30,0x35,0x30,0x38,0x30,0x34,0x30,0x33,0x30,0x35,0x30,0x38,0x30,0x30,0x30,0x33,
|
|
||||||
0x30,0x35,0x30,0x38,0x30,0x33,0x30,0x33,0x30,0x35,0x30,0x38,0x30,0x32,0x30,0x33,
|
|
||||||
0x30,0x32,0x30,0x34,0x30,0x30,0x30,0x33,0x30,0x32,0x30,0x34,0x30,0x31,0x30,0x33,
|
|
||||||
0x30,0x32,0x30,0x34,0x30,0x32,0x30,0x33,0x30,0x32,0x30,0x34,0x30,0x33,0x30,0x36,
|
|
||||||
0x30,0x31,0x30,0x32,0x30,0x31,0x32,0x43,0x33,0x30,0x30,0x31,0x30,0x36,0x30,0x31,
|
|
||||||
0x30,0x32,0x30,0x30,0x32,0x43,0x33,0x30,0x30,0x32,0x30,0x36,0x30,0x31,0x30,0x32,
|
|
||||||
0x30,0x30,0x32,0x43,0x33,0x30,0x30,0x33,0x30,0x36,0x30,0x31,0x30,0x32,0x30,0x30,
|
|
||||||
0x32,0x43,0x33,0x30,0x30,0x34,0x30,0x36,0x30,0x31,0x30,0x32,0x30,0x30,0x32,0x43,
|
|
||||||
0x33,0x30,0x30,0x35,0x30,0x36,0x30,0x31,0x30,0x32,0x30,0x30,0x32,0x43,0x33,0x30,
|
|
||||||
0x30,0x36,0x30,0x36,0x30,0x31,0x30,0x32,0x30,0x31,0x32,0x43,0x33,0x30,0x30,0x37,
|
|
||||||
0x30,0x36,0x30,0x31,0x30,0x32,0x30,0x31,0x32,0x43,0x33,0x30,0x30,0x39,0x30,0x36,
|
|
||||||
0x30,0x31,0x30,0x32,0x30,0x31,0x32,0x43,0x33,0x30,0x30,0x42,0x30,0x36,0x30,0x31,
|
|
||||||
0x30,0x32,0x30,0x30,0x32,0x43,0x33,0x30,0x30,0x30,0x54,0x30,0x2C,0x31,0x2C,0x32,
|
|
||||||
0x2C,0x33,0x2C,0x34,0x2C,0x35,0x2C,0x36,0x2C,0x37,0x2C,0x38,0x2C,0x39,0x34,0x26,
|
|
||||||
0x33
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// local function prototypes
|
// local function prototypes
|
||||||
static void IRext_uartDebug();
|
static void IRext_uartDebug();
|
||||||
@@ -273,7 +242,19 @@ static void IRext_processKey(uint8_t ir_type, uint8_t ir_key, char* key_display)
|
|||||||
{
|
{
|
||||||
if (IR_STATE_PARSED == dccb.ir_state)
|
if (IR_STATE_PARSED == dccb.ir_state)
|
||||||
{
|
{
|
||||||
dccb.decoded_length = ir_tv_lib_control(ir_key, dccb.ir_decoded);
|
if (IR_TYPE_TV == dccb.ir_type)
|
||||||
|
{
|
||||||
|
dccb.decoded_length = ir_tv_lib_control(ir_key, dccb.ir_decoded);
|
||||||
|
}
|
||||||
|
else if (IR_TYPE_AC == dccb.ir_type)
|
||||||
|
{
|
||||||
|
// dccb.decoded_length = ir_ac_lib_control(ac_status, dccb.ir_decoded, ir_key, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LCD_WRITE_STRING("DECODE ERROR", LCD_PAGE6);
|
||||||
|
}
|
||||||
|
|
||||||
if (dccb.decoded_length > 0)
|
if (dccb.decoded_length > 0)
|
||||||
{
|
{
|
||||||
LCD_WRITE_STRING(key_display, LCD_PAGE6);
|
LCD_WRITE_STRING(key_display, LCD_PAGE6);
|
||||||
@@ -826,12 +807,6 @@ static void SimpleBLEPeripheral_init(void)
|
|||||||
LCD_WRITE_STRING("STANDBY", LCD_PAGE7);
|
LCD_WRITE_STRING("STANDBY", LCD_PAGE7);
|
||||||
HalLedSet(HAL_LED_1, HAL_LED_MODE_OFF);
|
HalLedSet(HAL_LED_1, HAL_LED_MODE_OFF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// extra init for test purpose
|
|
||||||
memcpy(dccb.source_code, source_code, sizeof(source_code));
|
|
||||||
dccb.source_code_length = sizeof(source_code);
|
|
||||||
dccb.ir_state = IR_STATE_READY;
|
|
||||||
dccb.ir_type = IR_TYPE_AC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user