Changed float to int in battery controller file.
This commit is contained in:
parent
8697a06642
commit
952021cdb6
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ namespace Pinetime {
|
||||||
class CircBuffer {
|
class CircBuffer {
|
||||||
public:
|
public:
|
||||||
CircBuffer() : arr{}, sz{}, cap{N}, loc{} {}
|
CircBuffer() : arr{}, sz{}, cap{N}, loc{} {}
|
||||||
void insert(const float num) {
|
void insert(const int num) {
|
||||||
loc %= cap;
|
loc %= cap;
|
||||||
arr[loc++] = num;
|
arr[loc++] = num;
|
||||||
if (sz != cap) {
|
if (sz != cap) {
|
||||||
|
@ -26,7 +26,7 @@ namespace Pinetime {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<float, N> arr;
|
std::array<int, N> arr;
|
||||||
uint8_t sz;
|
uint8_t sz;
|
||||||
uint8_t cap;
|
uint8_t cap;
|
||||||
uint8_t loc;
|
uint8_t loc;
|
||||||
|
|
Loading…
Reference in a new issue