Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2clr committed Sep 19, 2024
1 parent 1c34dac commit 7a8da04
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions examples/SI47XX_ATS20_ATS20+/ATS20_ATS_EX/ATS_EX/ATS_EX.ino
Original file line number Diff line number Diff line change
Expand Up @@ -730,18 +730,34 @@ void showCharge(bool forceShow)
constexpr const uint8_t rows = 10;
const uint16_t dischargeTable[rows][2] =
{
{ 643, 100 }, //4.15v
{ 620, 95 }, //4.05v
{ 604, 90 }, //3.90v
{ 581, 80 }, //3.75v
{ 573, 60 }, //3.70v
{ 558, 40 }, //3.60v
{ 542, 20 }, //3.50v
{ 503, 15 }, //3.25v
{ 496, 5 }, //3.20v
{ 488, 0 }, //3.15v
{ 650, 100 }, //4.15v
{ 630, 95 }, //4.05v
{ 614, 90 }, //3.90v
{ 591, 80 }, //3.75v
{ 583, 60 }, //3.70v
{ 568, 40 }, //3.60v
{ 552, 20 }, //3.50v
{ 513, 15 }, //3.25v
{ 503, 5 }, //3.20v
{ 478, 0 }, //3.15v
};

/*
const uint16_t dischargeTable[rows][2] =
{
{ 512, 100 }, //4.15v
{ 498, 95 }, //4.05v
{ 485, 90 }, //3.90v
{ 471, 80 }, //3.75v
{ 458, 60 }, //3.70v
{ 444, 40 }, //3.60v
{ 431, 20 }, //3.50v
{ 417, 15 }, //3.25v
{ 404, 5 }, //3.20v
{ 390, 0 }, //3.15v
};
*/

auto getBatteryPercentage = [&](uint16_t currentSamples) -> uint8_t
{
if (currentSamples >= dischargeTable[0][0])
Expand Down

0 comments on commit 7a8da04

Please sign in to comment.