application: use ir_nec extended mode
This commit is contained in:
parent
a7aab104ba
commit
4a96073898
|
@ -356,7 +356,7 @@ void main(void)
|
|||
gpio_set_mode(GPIO(STROBE_PORT), GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_OPENDRAIN, GPIO(STROBE_PIN)); // set pin to output open-drain do enable strobe
|
||||
#endif
|
||||
strobe_off(); // switch off strobe per defaulf
|
||||
ir_nec_setup(); // setup ID NEC code decoder
|
||||
ir_nec_setup(true); // setup ID NEC code decoder
|
||||
printf("\nwelcome to the CuVoodoo STM32F1 spark strober\n"); // print welcome message
|
||||
|
||||
#if !(DEBUG)
|
||||
|
@ -413,7 +413,7 @@ void main(void)
|
|||
if (ir_nec_code_received_flag) { // IR code received
|
||||
ir_nec_code_received_flag = false; // reset flag
|
||||
led_on(); // notify user we received a code
|
||||
printf("IR NEC code received: addr=%+02x, cmd=%+02x%s\n", ir_nec_code_received.address, ir_nec_code_received.command, ir_nec_code_received.repeat ? " (repeat)" : "");
|
||||
printf("IR NEC code received: addr=%+04x, cmd=%+02x%s\n", ir_nec_code_received.address, ir_nec_code_received.command, ir_nec_code_received.repeat ? " (repeat)" : "");
|
||||
if (!ir_nec_code_received.repeat) { // ignore repeated codes
|
||||
ir_action(&ir_nec_code_received); // handle IR code
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue