This commit is contained in:
2022-01-04 15:50:20 +01:00
parent ec47ddc402
commit 14b25a9459
10 changed files with 125 additions and 134 deletions

View File

@@ -1,16 +1,18 @@
#pragma once
#include "ADS1X15.h"
#include "Battery.h"
#include "board.h"
#include "led.h"
#define ADSINTERVAL 100
#define VBATTINTERVALL 6000
#define VBATTMEASPRECHARGE 240
#define VBATTINTERVALL 15000
#define VBATTMEASPRECHARGE 10
#define HALLINTERVAL 100
#define HALLIDLETHRESHOLD 20
#define HALLIDLESAMPLES 8
#define HALLPLAYSAMPLES 16
#define HALLIDLESAMPLES 15
#define HALLPLAYSAMPLES 24
void initSensor(void);
@@ -22,3 +24,8 @@ uint16_t getHall( void );
bool hallIsIdle(void);
uint16_t getvbatt(uint8_t dummy);
bool getSensorInitStatus(void);
bool CheckBattery(void);
bool getLowBatt(void);