diff --git a/src/FoodDeliveryBase.cpp b/src/FoodDeliveryBase.cpp index 99b33c5..8d97252 100644 --- a/src/FoodDeliveryBase.cpp +++ b/src/FoodDeliveryBase.cpp @@ -527,7 +527,7 @@ void FoodCube::mav_request_data() int len = mavlink_msg_to_send_buffer(buf, &msg); SWrite(buf, len, mavlinkSerial); } - // printf("send_mav\n"); + //ESP_LOGD(MOUDLENAME, "request_data_stream\n"); } /** diff --git a/src/FoodDeliveryBase.h b/src/FoodDeliveryBase.h index 0c00c6b..d542313 100644 --- a/src/FoodDeliveryBase.h +++ b/src/FoodDeliveryBase.h @@ -72,7 +72,7 @@ public: V9 = 9 }; unsigned long lastRunTime = 0; // playText()上次运行时间戳 - void playText(String str, VoiceVolume vol = V5); + void playText(String str, VoiceVolume vol = V1); void SetplayvolMax(); uint8_t chekVoiceMcu(); void stopVoice(); diff --git a/src/commser.cpp b/src/commser.cpp index df565d0..851f417 100644 --- a/src/commser.cpp +++ b/src/commser.cpp @@ -473,8 +473,10 @@ void mavlink_receiveCallback(uint8_t c) { // MAVLink解析是按照一个一个字符进行解析,我们接收到一个字符,就对其进行解析,直到解析完(根据返回标志判断)一帧数据为止。 // 通过msgid来判断 数据流的类别 char buf[50]; - - // printf("mav_id:%d\n",msg.msgid); + + //ESP_LOGD(MOUDLENAME, "mav_id:%d\n",msg.msgid); + + // printf("mav_id:%d\n",msg.msgid); switch (msg.msgid) { // case MAVLINK_MSG_ID_RC_CHANNELS: // #65 遥控通道数据 @@ -721,12 +723,14 @@ void mavlink_receiveCallback(uint8_t c) { mavlink_sys_status_t sys_status; // 解构的数据放到这个对象 mavlink_msg_sys_status_decode(&msg, &sys_status); // 解构msg数据 - // // 电压 - // sprintf(buf, "%.2f", (double)sys_status.voltage_battery / 1000); - // if (topicPubMsg[1] != buf) - // { // 有更新 则更新数据 - // topicPubMsg[1] = buf; - // } + //ESP_LOGD(MOUDLENAME, "SYS_STATUS:V:%.2f,C:%.2f,%d\n",(double)sys_status.voltage_battery / 1000, + // (double)sys_status.current_battery / 1000,sys_status.battery_remaining); + // 电压 + sprintf(buf, "%.2f", (double)sys_status.voltage_battery / 1000); + if (topicPubMsg[1] != buf) + { // 有更新 则更新数据 + topicPubMsg[1] = buf; + } // 电流 sprintf(buf, "%.2f", (double)sys_status.current_battery / 100); // 解构中 1=10毫安 所以这里/100 最终单位是A 安培 if (topicPubMsg[2] != buf) diff --git a/src/config.h b/src/config.h index 0a030d9..ce3bb26 100644 --- a/src/config.h +++ b/src/config.h @@ -29,7 +29,7 @@ // Moto-CAN //第二版本硬件参数---2号机使用 #define MOTO_CAN_RX 27 // PCB画板需要,做了调整 #define MOTO_CAN_TX 26 // PCB画板需要,做了调整 -#define WEIGHT_SCALE 49 // 减少零点漂移用B通道是41 实测改为49 +#define WEIGHT_SCALE 46 // 减少零点漂移用B通道是41 实测改为49 2026.1.7:实测: 44.75 #define HX711_GAIN 32 // 减少零点漂移用B通道的感度 #endif diff --git a/src/main.cpp b/src/main.cpp index 4845fe3..f848833 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,7 +106,7 @@ void setup() // ESP_LOGI(MOUDLENAME, "Starting PullupDevice... Ver:%s", VERSION); preferences.begin("PullupDev", false); wei_offset = preferences.getLong("wei_offset", 0); - // ESP_LOGD(MOUDLENAME, "wei_offset:%d", wei_offset); + // ESP_LOGD(MOUDLENAME, "wei_offset:%d", wei_offset); // addLogMessage("wei_offset: " + String(wei_offset)); // 初始化按钮