Fix voltage on home screen

This commit is contained in:
Ben V. Brown
2020-09-20 16:24:39 +10:00
parent 60e3616c79
commit 89522027b7
3 changed files with 84 additions and 124 deletions

View File

@@ -57,10 +57,7 @@ uint16_t getHandleTemperature() {
#endif
}
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) {
// ADC maximum is 32767 == 3.3V at input == 28.05V at VIN
// Therefore we can divide down from there
// Multiplying ADC max by 4 for additional calibration options,
// ideal term is 467
static uint8_t preFillneeded = 10;
static uint32_t samples[BATTFILTERDEPTH];

View File

@@ -17,10 +17,9 @@
#ifdef MODEL_Pinecil
#define POW_PD
//#define POW_QC
#define POW_QC
#define TEMP_TMP36
//#define ACCEL_BMA
#define ACCEL_BMA
#define BATTFILTERDEPTH 32
#endif