diff --git a/src/config.h b/src/config.h index f057190..685af4e 100644 --- a/src/config.h +++ b/src/config.h @@ -38,7 +38,7 @@ #define SERIAL_REPORT_RX 18 ///// // #define WEIGHT_SCALE 41 // //A通道是165,B通道是41 -#define TM_INSTORE_WEIGHT_DELAY 270 // 200 // 入仓动力延时关闭时间 ms +#define TM_INSTORE_WEIGHT_DELAY 200 // 200 // 入仓动力延时关闭时间 ms #define TM_INSTORE_DELAY_WEIGHT 200 // 入仓动力延时关闭时间生效的重量(g),免得空钩也延时关闭导致线拉紧 ms #define TM_INSTORE_NOWEIGHT_DELAY 50 // 空钩完全不延时也可能顶部按键按不下去,加一点延时 ms diff --git a/src/main.cpp b/src/main.cpp index b65d380..f384270 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -100,7 +100,7 @@ void setup() preferences.begin("PullupDev", false); wei_offset = preferences.getLong("wei_offset", 0); // ESP_LOGD(MOUDLENAME, "wei_offset:%d", wei_offset); - addLogMessage("wei_offset: " + String(wei_offset)); + // addLogMessage("wei_offset: " + String(wei_offset)); // 初始化按钮 button_up.attachClick(upbtn_click); @@ -231,7 +231,7 @@ void showinfo() void begin_tare() { // ESP_LOGD(MOUDLENAME, "begin_tare"); - addLogMessage("begin_tare,校准称重"); + // addLogMessage("begin_tare,校准称重"); _weightalign_status = WAS_Aligning; _needweightalign = true; _weightalign_begintm = millis(); @@ -259,7 +259,7 @@ bool check_tare() preferences.putLong("wei_offset", wei_offset); motocontrol.weightalign(true); // ESP_LOGD(MOUDLENAME, "check_tare ok: %d,offset:%d", pullweight, wei_offset); - addLogMessage("check_tare ok: " + String(pullweight) + ", offset: " + String(wei_offset)); + // addLogMessage("check_tare ok: " + String(pullweight) + ", offset: " + String(wei_offset)); return true; } else @@ -269,7 +269,7 @@ bool check_tare() { // 没成功继续校准 // ESP_LOGD(MOUDLENAME, "weight not zero: %d", pullweight); - addLogMessage("weight not zero: " + String(pullweight)); + // addLogMessage("weight not zero: " + String(pullweight)); _needweightalign = true; pullweightoktimes = 0; } @@ -296,7 +296,7 @@ void checkinited() { // 开始自动慢速上升,直到顶部按钮按下 // ESP_LOGD(MOUDLENAME, "IS_Start: startup wait locked"); - addLogMessage("IS_Start: startup wait locked"); + // addLogMessage("IS_Start: startup wait locked"); motocontrol.setspeed(SPEED_BTN_SLOW); motocontrol.moto_run(MotoStatus::MS_Up); initstatus = IS_Wait_Locked; diff --git a/src/motocontrol.cpp b/src/motocontrol.cpp index 6c1b066..cfc2173 100644 --- a/src/motocontrol.cpp +++ b/src/motocontrol.cpp @@ -105,7 +105,10 @@ void Motocontrol::checkgoods() // 检测是否超重 { // 到顶部锁定状态,有向上的压力,重量不准,不能检测 if (_controlstatus.is_toplocked) + { + addLogMessage("is_toplocked"); return; + } // 检查是否超重 if (_pullweight > HOOK_WEIHT_MAX)