Merge pull request #1616 from neilhao/master

'Station-g1-patch1'
pull/1615/head^2
Thomas Göttgens 2022-08-10 15:46:26 +02:00 zatwierdzone przez GitHub
commit 3cc584d855
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 20 dodań i 2 usunięć

Wyświetl plik

@ -156,8 +156,21 @@ class AnalogBatteryLevel : public HasBatteryLevel
/// If we see a battery voltage higher than physics allows - assume charger is pumping
/// in power
#ifndef BAT_FULLVOLT
#define BAT_FULLVOLT 4200
#endif
#ifndef BAT_EMPTYVOLT
#define BAT_EMPTYVOLT 3270
#endif
#ifndef BAT_CHARGINGVOLT
#define BAT_CHARGINGVOLT 4210
#endif
#ifndef BAT_NOBATVOLT
#define BAT_NOBATVOLT 2230
#endif
/// For heltecs with no battery connected, the measured voltage is 2204, so raising to 2230 from 2100
const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2230;
const float fullVolt = BAT_FULLVOLT, emptyVolt = BAT_EMPTYVOLT, chargingVolt = BAT_CHARGINGVOLT, noBatVolt = BAT_NOBATVOLT;
float last_read_value = 0.0;
uint32_t last_read_time_ms = 0;
};

Wyświetl plik

@ -26,11 +26,16 @@
//#define SX126X_E22 // Not really an E22
// Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
// code)
#define SX126X_MAX_POWER 16 //Ensure the PA does not exceed the saturation output power. More Info:https://uniteng.com/wiki/doku.php?id=meshtastic:station#rf_design_-_lora_station_edition_g1
#endif
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define BATTERY_SENSE_SAMPLES 30 //Set the number of samples, It has an effect of increasing sensitivity.
#define ADC_MULTIPLIER 2.15
#define ADC_MULTIPLIER 6.45
#define BAT_FULLVOLT 12600
#define BAT_EMPTYVOLT 8200
#define BAT_CHARGINGVOLT 12600
#define BAT_NOBATVOLT 6690
// different screen
#define USE_SH1106