修改HY协议电池数据报返回数据

This commit is contained in:
起床就犯困 2025-02-21 10:32:04 +08:00
parent d95bb1c141
commit 2430b9630d
1 changed files with 11 additions and 9 deletions

View File

@ -3203,7 +3203,7 @@ BOOL analysisBatteryStatusHY(void)
temp = getDischargCurrent(); temp = getDischargCurrent();
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
replay_pack += 4; replay_pack += 4;
//充电电流 //充电电流1
// *(float *)(replay_pack) = getChargCurrent(); // *(float *)(replay_pack) = getChargCurrent();
temp = getChargCurrent(); temp = getChargCurrent();
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
@ -3213,26 +3213,28 @@ BOOL analysisBatteryStatusHY(void)
temp = getSOC(); temp = getSOC();
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
replay_pack += 4; replay_pack += 4;
//充电开路电压 //充电开路电压1
// *(float *)(replay_pack) = getSolarOpenCircuitVoltage(); // *(float *)(replay_pack) = getSolarOpenCircuitVoltage();
temp = getSolarOpenCircuitVoltage(); temp = getSolarOpenCircuitVoltage();
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
replay_pack += 4; replay_pack += 4;
//充电开关状态 //充电开关状态1
*(replay_pack) = getChargMosState(); *(replay_pack) = getChargMosState();
replay_pack += 1; replay_pack += 1;
//充电电流 //充电电流2
// *(float *)(replay_pack) = getChargCurrent(); // *(float *)(replay_pack) = getChargCurrent();
temp = getChargCurrent(); // temp = getChargCurrent();
temp = 0;
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
replay_pack += 4; replay_pack += 4;
//充电开路电压 //充电开路电压2
// *(float *)(replay_pack) = getSolarOpenCircuitVoltage(); // *(float *)(replay_pack) = getSolarOpenCircuitVoltage();
temp = getSolarOpenCircuitVoltage(); // temp = getSolarOpenCircuitVoltage();
temp = 0;
memcpy(replay_pack, &temp, sizeof(float)); memcpy(replay_pack, &temp, sizeof(float));
replay_pack += 4; replay_pack += 4;
//充电开关状态 //充电开关状态2
*(replay_pack) = getChargMosState(); *(replay_pack) = 0x00;
replay_pack += 1; replay_pack += 1;
//工作温度 //工作温度
// *(float *)(replay_pack) = getHighSideMosTemperature(); // *(float *)(replay_pack) = getHighSideMosTemperature();