enabled IR in init phase
This commit is contained in:
@@ -18,8 +18,8 @@ platform = espressif8266
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 115200
|
upload_speed = 115200
|
||||||
upload_port = COM6
|
upload_port = COM5
|
||||||
monitor_port = COM6
|
monitor_port = COM5
|
||||||
board_build.flash_mode = dout
|
board_build.flash_mode = dout
|
||||||
build_flags =
|
build_flags =
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
|
|||||||
@@ -176,7 +176,16 @@ void setup() {
|
|||||||
saveSettings();
|
saveSettings();
|
||||||
|
|
||||||
delay(SYSTEM_DELAY);
|
delay(SYSTEM_DELAY);
|
||||||
loadIRPin(ConfigData["pin"]["ir_send"], ConfigData["pin"]["ir_receive"]);
|
uint8_t send_pin = ConfigData["pin"]["ir_send"];
|
||||||
|
uint8_t recv_pin = ConfigData["pin"]["ir_receive"];
|
||||||
|
if (send_pin == 0) {
|
||||||
|
send_pin = ir_send_pin;
|
||||||
|
}
|
||||||
|
if (recv_pin == 0) {
|
||||||
|
recv_pin = ir_receive_pin;
|
||||||
|
}
|
||||||
|
INFOF("IR pin config get : %d, %d\n", send_pin, recv_pin);
|
||||||
|
loadIRPin(send_pin, recv_pin);
|
||||||
connectToAliyunIoT();
|
connectToAliyunIoT();
|
||||||
|
|
||||||
alinkCheckTask.attach_scheduled(MQTT_CHECK_INTERVALS, checkAlinkMQTT);
|
alinkCheckTask.attach_scheduled(MQTT_CHECK_INTERVALS, checkAlinkMQTT);
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ typedef unsigned char uint8_t;
|
|||||||
#define RESET_PIN 2
|
#define RESET_PIN 2
|
||||||
|
|
||||||
/* 315 RF pin */
|
/* 315 RF pin */
|
||||||
#define T_315 5
|
// #define T_315 5
|
||||||
#define R_315 4
|
// #define R_315 4
|
||||||
|
|
||||||
/* 433 RF pin */
|
/* 433 RF pin */
|
||||||
#define T_433 14
|
#define T_433 14
|
||||||
@@ -74,7 +74,7 @@ typedef unsigned char uint8_t;
|
|||||||
|
|
||||||
/* IR pin */
|
/* IR pin */
|
||||||
#define T_IR 14
|
#define T_IR 14
|
||||||
#define R_IR 12
|
#define R_IR 4
|
||||||
|
|
||||||
/* ----------------- lsoc setting --------------- */
|
/* ----------------- lsoc setting --------------- */
|
||||||
/* lsoc heart beat cycle */
|
/* lsoc heart beat cycle */
|
||||||
|
|||||||
Reference in New Issue
Block a user