diff --git a/platformio.ini b/platformio.ini index fe2dc6d..72a07c0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,4 +23,5 @@ lib_deps = siwats/ESPMegaPROR3@^1.3.0 robtillaart/FRAM_I2C@^0.6.1 esphome/ESPAsyncWebServer-esphome@^3.1.0 bblanchon/ArduinoJson@^6.21.3 -monitor_speed = 115200 \ No newline at end of file +monitor_speed = 115200 +monitor_port = COM26 \ No newline at end of file diff --git a/src/user_code.cpp b/src/user_code.cpp index 3721aa5..2b87be3 100644 --- a/src/user_code.cpp +++ b/src/user_code.cpp @@ -14,7 +14,7 @@ uint8_t slot_minutes[TOTAL_SLOT + 1] = {0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30 #define elcd ESPMega_EXTLCD // Link with Dual state button object with id 2 on page 1 named bt0 NexPicture lt_bt = NexPicture(1, 1, "lt_bt"); -NexPicture av_bt = NexPicture(1, 3, "lt_bt"); +NexPicture av_bt = NexPicture(1, 3, "av_bt"); NexButton left_bt = NexButton(1, 5, "left_bt"); NexButton right_bt = NexButton(1, 6, "right_bt"); NexPicture slot1 = NexPicture(1, 7, "slot1"); @@ -36,7 +36,8 @@ NexTouch *nex_listen_list[] = &slot3, &slot4, &slot5, - + &left_bt, + &right_bt, NULL}; bool light_group_state() @@ -51,6 +52,7 @@ bool light_group_state() void lt_bt_cb(void *ptr) { + Serial.println("ltcb"); bool state = !light_group_state(); for (int i = 0; i++; i <= 5) pwm_set_state(i, state); @@ -58,11 +60,13 @@ void lt_bt_cb(void *ptr) void av_bt_cb(void *ptr) { + Serial.println("avcb"); pwm_toggle(3); } void left_bt_cb(void *ptr) { + Serial.println("leftcb"); if(cycle_slot_start>0){ cycle_slot_start--; write_time_slot(); @@ -71,6 +75,7 @@ void left_bt_cb(void *ptr) void right_bt_cb(void *ptr) { + Serial.println("rightcb"); if(cycle_slot_start