mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-06 15:05:57 +00:00
GPS for iGate
This commit is contained in:
parent
c0641986aa
commit
00db358cc3
14 changed files with 201 additions and 38 deletions
|
|
@ -47,6 +47,36 @@ namespace POWER_Utils {
|
|||
#endif
|
||||
}
|
||||
|
||||
void activateGPS() {
|
||||
#ifdef HAS_AXP192
|
||||
PMU.setLDO3Voltage(3300);
|
||||
PMU.enableLDO3();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_AXP2101
|
||||
PMU.setALDO3Voltage(3300);
|
||||
PMU.enableALDO3();
|
||||
#endif
|
||||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
digitalWrite(VEXT_CTRL, HIGH);
|
||||
#endif
|
||||
//gpsIsActive = true;
|
||||
}
|
||||
|
||||
void deactivateGPS() {
|
||||
#ifdef HAS_AXP192
|
||||
PMU.disableLDO3();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_AXP2101
|
||||
PMU.disableALDO3();
|
||||
#endif
|
||||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
digitalWrite(VEXT_CTRL, LOW);
|
||||
#endif
|
||||
//gpsIsActive = false;
|
||||
}
|
||||
|
||||
void activateLoRa() {
|
||||
#ifdef HAS_AXP192
|
||||
PMU.setLDO2Voltage(3300);
|
||||
|
|
@ -159,6 +189,10 @@ namespace POWER_Utils {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAS_GPS
|
||||
if (Config.beacon.gpsActive) activateGPS();
|
||||
#endif
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
pinMode(ADC_CTRL, OUTPUT);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue