SOC计算部分代码解析.docVIP

  • 146
  • 0
  • 约3.32万字
  • 约 10页
  • 2017-06-08 发布于河南
  • 举报
SOC计算部分代码解析

static void Soc_CheckRule3(U8 soc){/// #pragma section SOC_FLASH_section end static U8 rule3Debounce = 3; // over 3 readings #pragma define_section SOC_FLASH_section SOC_FLASH RWX #pragma section SOC_FLASH_section begin U16 rule3 = 0; U16 rule3Threshold = RULE_3_THRESHOLD; if(coulombSoc soc){ rule3 = (U16)coulombSoc - soc; rule3Threshold *= socValue; rule3Threshold /= 255; if(rule3 rule3Threshold){ if(rule3Debounce) rule3Debounce--; else socControl = (U8)(MODE_4 | (socControl (BATTERY_EMPTY | CAPACITY_LEARNED))); } else rule3Debounce = 3; } else rule3De

文档评论(0)

1亿VIP精品文档

相关文档