mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
修改现场设备联调问题
This commit is contained in:
@@ -221,7 +221,10 @@ void Device::setParam(std::string k, int v)
|
||||
else if (k== "28") { ratio = 0.1; }
|
||||
}
|
||||
|
||||
int precision = (ratio != 1.0f) ? 1 : 0;
|
||||
int precision = 0;
|
||||
if (ratio == 0.1f) { precision = 1; }
|
||||
else if (ratio == 0.01f) { precision = 2; }
|
||||
else if (ratio == 0.001f) { precision = 3; }
|
||||
std::string valStr = Utils::toStr(v*ratio, precision);
|
||||
if (type == 106) // 充电桩状态,特殊数据格式
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user