Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martonmiklos/b7ce5146080f85d50f9834d8bf098b45 to your computer and use it in GitHub Desktop.
Save martonmiklos/b7ce5146080f85d50f9834d8bf098b45 to your computer and use it in GitHub Desktop.
uint8_t batter_check()
{
if ((6000 < designvoltage)&&(designvoltage < 8000))
{
return 2;
}
if ((9000 < designvoltage)&&(designvoltage < 12000))
{
return 3;
}
if ((12000 < designvoltage)&&(designvoltage < 16000))
{
return 4;
}
else
{
return 0;
}
return cell_count;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment