Fixed bugs and added defines

Ready for testing
This commit is contained in:
Rafi Khan
2017-08-18 17:10:23 -06:00
parent c43d221a7b
commit 42b791f9ad
2 changed files with 10 additions and 2 deletions

View File

@@ -79,6 +79,9 @@
#define DECODE_LEGO_PF 0 // NOT WRITTEN #define DECODE_LEGO_PF 0 // NOT WRITTEN
#define SEND_LEGO_PF 1 #define SEND_LEGO_PF 1
#define DECODE_RECS80 0 // NOT WRITTEN
#define SEND_RECS80 1 // Still being tested
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// When sending a Pronto code we request to send either the "once" code // When sending a Pronto code we request to send either the "once" code
// or the "repeat" code // or the "repeat" code
@@ -350,6 +353,10 @@ class IRsend
# if SEND_LEGO_PF # if SEND_LEGO_PF
void sendLegoPowerFunctions (uint16_t data, bool repeat = true) ; void sendLegoPowerFunctions (uint16_t data, bool repeat = true) ;
# endif # endif
//......................................................................
# if SEND_RECS80
void sendRECS80 (uint8_t address, uint8_t address_nbit, uint8_t command, uint8_t command_nbit) ;
# endif
#ifdef USE_SOFT_CARRIER #ifdef USE_SOFT_CARRIER
private: private:

View File

@@ -7,6 +7,7 @@
#define RECS80_MARK 158 #define RECS80_MARK 158
#define RECS80_ONE_SPACE 7426 #define RECS80_ONE_SPACE 7426
#define RECS80_ZERO_SPACE 4898 #define RECS80_ZERO_SPACE 4898
#if SEND_RECS80 #if SEND_RECS80
void IRsend::sendRECS80 (uint8_t address, uint8_t address_nbit, uint8_t command, uint8_t command_nbit) { void IRsend::sendRECS80 (uint8_t address, uint8_t address_nbit, uint8_t command, uint8_t command_nbit) {
@@ -27,7 +28,7 @@ void IRsend::sendRECS80 (uint8_t address, uint8_t address_nbit, uint8_t command,
if (address & mask) { if (address & mask) {
space(RECS80_ONE_SPACE); space(RECS80_ONE_SPACE);
} else { } else {
space(RECS80_ONE_ZERO); space(RECS80_ZERO_SPACE);
} }
} }
@@ -39,7 +40,7 @@ void IRsend::sendRECS80 (uint8_t address, uint8_t address_nbit, uint8_t command,
if (command & mask) { if (command & mask) {
space(RECS80_ONE_SPACE); space(RECS80_ONE_SPACE);
} else { } else {
space(RECS80_ONE_ZERO); space(RECS80_ZERO_SPACE);
} }
} }