修复焊接电流负值时上报平台值为0问题
authorkyz <kongyuzhong@google.com>
Tue, 19 Aug 2025 14:39:48 +0000 (22:39 +0800)
committerkyz <kongyuzhong@google.com>
Tue, 19 Aug 2025 14:39:48 +0000 (22:39 +0800)
user/user_report.c

index 9a57a1bbf1a009d8378b299dfaec2313014d255f..65cb2326b4c5dbec574984274094bb8059f3ef43 100644 (file)
@@ -63,7 +63,7 @@ static const char* keepalive_fmt ="{ \"action\":\"heartbeat\", \"mac\":\"%s\" }"
 typedef struct{
        uint32_t cid;
        char* mac;
-       uint32_t curr_x10;
+       int32_t curr_x10;
        uint32_t weld_st;
        uint32_t flow_x10;
        uint32_t vol_x10;//电压
@@ -107,7 +107,7 @@ int32_t get_new_rpt_info( rpt_info_t *rpt )
 
        rpt->cid = g_rpt_sent.cid;
        rpt->mac = g_mac_str;
-       rpt->curr_x10 = (uint32_t)(welding_curr_disp_value( g_dev.welding_current )*10);
+       rpt->curr_x10 = (int32_t)(welding_curr_disp_value( g_dev.welding_current )*10);
        rpt->weld_st = g_dev.welding_start;
        rpt->flow_x10 = (uint32_t)(g_dev.flowmeter.flow_speed*10);
        rpt->vol_x10  = (uint32_t)(g_dev.welding_voltage*10);