mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-10 08:26:17 +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
|
||||
void storeCode(decode_results *results) {
|
||||
codeType = results->decode_type;
|
||||
int count = results->rawlen;
|
||||
//int count = results->rawlen;
|
||||
if (codeType == UNKNOWN) {
|
||||
Serial.println("Received unknown code, saving as raw");
|
||||
codeLen = results->rawlen - 1;
|
||||
|
||||
@@ -61,7 +61,7 @@ void setup()
|
||||
// Wait for the gap between tests, to synchronize with
|
||||
// the sender.
|
||||
// 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");
|
||||
while (1) {
|
||||
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
|
||||
// can do the same test calls, and the mode variable indicates whether
|
||||
// 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) {
|
||||
Serial.println(label);
|
||||
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,
|
||||
// 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) {
|
||||
Serial.println(label);
|
||||
irsend.sendRaw(rawbuf, rawlen, 38 /* kHz */);
|
||||
|
||||
@@ -192,12 +192,12 @@ void loop()
|
||||
ac_activate(AC_TEMPERATURE, AC_FLOW);
|
||||
break;
|
||||
case 2:
|
||||
if ( b == 0 | b == 1 ) {
|
||||
if ( b == 0 || b == 1 ) {
|
||||
ac_change_air_swing(b);
|
||||
}
|
||||
break;
|
||||
case 3: // 1 : clean on, power on
|
||||
if ( b == 0 | b == 1 ) {
|
||||
if ( b == 0 || b == 1 ) {
|
||||
ac_air_clean(b);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user