diff --git a/README.md b/README.md index 772d307..c383f23 100644 --- a/README.md +++ b/README.md @@ -151,20 +151,6 @@ Watch this repo for new updates! And of course, contributions are welcome ;) - Other Contributors: - https://github.com/vshymanskyy/TinyGSM/graphs/contributors - -## Donation - -[![Donate BountySource](https://img.shields.io/badge/Donate-BountySource-149E5E.svg)](https://salt.bountysource.com/checkout/amount?team=tinygsm-dev) -[![Donate Bitcoin](https://img.shields.io/badge/Donate-Bitcoin-orange.svg)](http://tny.im/aen) - -If you have found TinyGSM to be useful in your work, research or company, please consider making a donation to the project commensurate with your resources. Any amount helps! -**All donations will be used strictly to fund the development of TinyGSM:** -- Covering cellular network expenses -- Buying new hardware and modems for integration -- Bounty Budget (to reward other developers for their contributions) -- Implementing new features -- Quality Assurance - ## Getting Started #### First Steps diff --git a/src/TinyGsmClientSIM7600.h b/src/TinyGsmClientSIM7600.h index 7f21a16..88ba9b2 100644 --- a/src/TinyGsmClientSIM7600.h +++ b/src/TinyGsmClientSIM7600.h @@ -525,6 +525,32 @@ class TinyGsmSim7600 : public TinyGsmModem, return false; } + + /** + * CGNSSMODE: , + * This command is used to configure GPS, GLONASS, BEIDOU and QZSS support mode. + * 0 : GLONASS + * 1 : BEIDOU + * 2 : GALILEO + * 3 : QZSS + * dpo_mode: 1 enable , 0 disable + */ + String setGNSSModeImpl(uint8_t mode,bool dpo){ + String res; + sendAT(GF("+CGNSSMODE="), mode,",",dpo); + if (waitResponse(10000L,res) != 1) { return "";} + res.replace(GSM_NL, ""); + res.trim(); + return res; + } + + uint8_t getGNSSModeImpl(){ + sendAT(GF("+CGNSSMODE?")); + if (waitResponse(GF(GSM_NL "+CGNSSMODE:")) != 1) { return 0;} + return stream.readStringUntil(',').toInt(); + } + + /* * Time functions */ diff --git a/src/TinyGsmGPS.tpp b/src/TinyGsmGPS.tpp index 9d09fc9..73af243 100644 --- a/src/TinyGsmGPS.tpp +++ b/src/TinyGsmGPS.tpp @@ -43,6 +43,16 @@ class TinyGsmGPS { hour, minute, second); } + String setGNSSMode(uint8_t mode,bool dpo) + { + return thisModem().setGNSSModeImpl(mode,dpo); + } + + uint8_t getGNSSMode() + { + return thisModem().getGNSSModeImpl(); + } + /* * CRTP Helper */ @@ -66,6 +76,8 @@ class TinyGsmGPS { int* year = 0, int* month = 0, int* day = 0, int* hour = 0, int* minute = 0, int* second = 0) TINY_GSM_ATTR_NOT_IMPLEMENTED; + String setGNSSModeImpl(uint8_t mode,bool dpo) TINY_GSM_ATTR_NOT_IMPLEMENTED; + uint8_t getGNSSModeImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED; };