浏览代码

Corrected some compile errors

Thomas Chef 2 年之前
父节点
当前提交
6ae353c249
共有 4 个文件被更改,包括 15 次插入10 次删除
  1. 2 2
      main/config.h
  2. 7 0
      main/ir_transmit.h
  3. 0 2
      main/receiver.c
  4. 6 6
      main/toshiba_ir.h

+ 2 - 2
main/config.h

@@ -12,8 +12,8 @@
 
 #define MQTT_DEBUG              // Add an extra debug string to the topic-string
 
-//#define RX_TIMER
-//#define IR_RECEIVER
+#define RX_TIMER
+#define IR_RECEIVER
 
 #define ONE_WIRE_BUS_IO           GPIO_NUM_16   // Temp sensors
 

+ 7 - 0
main/ir_transmit.h

@@ -1,3 +1,6 @@
+#ifndef __IR_TRANSMIT__
+#define __IR_TRANSMIT__
+
 #include "freertos/queue.h"
 
 
@@ -5,3 +8,7 @@
 void initIrTransmit();
 
 extern QueueHandle_t toshibaTxQueue;
+
+
+
+#endif

+ 0 - 2
main/receiver.c

@@ -38,8 +38,6 @@ void receiverTask(void *pvParameter)
 {
     ESP_LOGI("RX", "Receiver task starting.");
     uint32_t width;
-    uint8_t data[kToshibaNumberOfBytes];
-
 
     while (1) {
 

+ 6 - 6
main/toshiba_ir.h

@@ -5,12 +5,12 @@
 #include <stdint.h>
 
 // Toshiba A/C
-const uint32_t kToshibaAcHdrMark = 4420;    // 4.4mS
-const uint32_t kToshibaAcHdrSpace = 4450;
-const uint32_t kToshibaAcBitMark = 570;
-const uint32_t kToshibaAcOneSpace = 1600;
-const uint32_t kToshibaAcZeroSpace = 510;
-const uint32_t kToshibaAcUsualGap = 7960;  // Others
+#define kToshibaAcHdrMark ((uint32_t)4420)
+#define kToshibaAcHdrSpace ((uint32_t)4450)
+#define kToshibaAcBitMark ((uint32_t)570)
+#define kToshibaAcOneSpace ((uint32_t)1600)
+#define kToshibaAcZeroSpace ((uint32_t)510)
+#define kToshibaAcUsualGap ((uint32_t)7960)
 
 void Toshiba_ir_ResetDecoder ();