mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-11 08:56:14 +00:00
Fix minor compiler warnings in examples
This commit is contained in:
@@ -45,7 +45,7 @@ int toggle = 0; // The RC5/6 toggle state
|
|||||||
// Most of this code is just logging
|
// Most of this code is just logging
|
||||||
void storeCode(decode_results *results) {
|
void storeCode(decode_results *results) {
|
||||||
codeType = results->decode_type;
|
codeType = results->decode_type;
|
||||||
int count = results->rawlen;
|
//int count = results->rawlen;
|
||||||
if (codeType == UNKNOWN) {
|
if (codeType == UNKNOWN) {
|
||||||
Serial.println("Received unknown code, saving as raw");
|
Serial.println("Received unknown code, saving as raw");
|
||||||
codeLen = results->rawlen - 1;
|
codeLen = results->rawlen - 1;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void setup()
|
|||||||
// Wait for the gap between tests, to synchronize with
|
// Wait for the gap between tests, to synchronize with
|
||||||
// the sender.
|
// the sender.
|
||||||
// Specifically, wait for a signal followed by a gap of at last gap ms.
|
// Specifically, wait for a signal followed by a gap of at last gap ms.
|
||||||
void waitForGap(int gap) {
|
void waitForGap(unsigned long gap) {
|
||||||
Serial.println("Waiting for gap");
|
Serial.println("Waiting for gap");
|
||||||
while (1) {
|
while (1) {
|
||||||
while (digitalRead(RECV_PIN) == LOW) {
|
while (digitalRead(RECV_PIN) == LOW) {
|
||||||
@@ -125,7 +125,7 @@ void dump(decode_results *results) {
|
|||||||
// The motivation behind this method is that the sender and the receiver
|
// The motivation behind this method is that the sender and the receiver
|
||||||
// can do the same test calls, and the mode variable indicates whether
|
// can do the same test calls, and the mode variable indicates whether
|
||||||
// to send or receive.
|
// to send or receive.
|
||||||
void test(char *label, int type, unsigned long value, int bits) {
|
void test(const char *label, int type, unsigned long value, int bits) {
|
||||||
if (mode == SENDER) {
|
if (mode == SENDER) {
|
||||||
Serial.println(label);
|
Serial.println(label);
|
||||||
if (type == NEC) {
|
if (type == NEC) {
|
||||||
@@ -175,7 +175,7 @@ void test(char *label, int type, unsigned long value, int bits) {
|
|||||||
|
|
||||||
// Test raw send or receive. This is similar to the test method,
|
// Test raw send or receive. This is similar to the test method,
|
||||||
// except it send/receives raw data.
|
// except it send/receives raw data.
|
||||||
void testRaw(char *label, unsigned int *rawbuf, int rawlen) {
|
void testRaw(const char *label, unsigned int *rawbuf, int rawlen) {
|
||||||
if (mode == SENDER) {
|
if (mode == SENDER) {
|
||||||
Serial.println(label);
|
Serial.println(label);
|
||||||
irsend.sendRaw(rawbuf, rawlen, 38 /* kHz */);
|
irsend.sendRaw(rawbuf, rawlen, 38 /* kHz */);
|
||||||
|
|||||||
@@ -192,12 +192,12 @@ void loop()
|
|||||||
ac_activate(AC_TEMPERATURE, AC_FLOW);
|
ac_activate(AC_TEMPERATURE, AC_FLOW);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if ( b == 0 | b == 1 ) {
|
if ( b == 0 || b == 1 ) {
|
||||||
ac_change_air_swing(b);
|
ac_change_air_swing(b);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // 1 : clean on, power on
|
case 3: // 1 : clean on, power on
|
||||||
if ( b == 0 | b == 1 ) {
|
if ( b == 0 || b == 1 ) {
|
||||||
ac_air_clean(b);
|
ac_air_clean(b);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user