Commit Graph

267 Commits

Author SHA1 Message Date
S5NC
2544733ad4
Standardise order for setting GPIO pin default values (#2942)
* Update SX126xInterface.cpp

* Update GPS.cpp

* Update TFTDisplay.cpp

* Update SX128xInterface.cpp

* Update EInkDisplay2.cpp

* trunk fmt

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2023-12-02 07:40:31 -06:00
Jonathan Bennett
423b8ad603 Adds real GPS support to Raspberry Pi arch 2023-11-29 20:19:10 -06:00
Ben Meadors
c7f6071f70
Enable IO2 toggling on RAK if the coast is clear (#2968)
* Enable IO2 toggling on RAK if the coast is clear

* Guard against monteops target which doesn't use 3V3 pin

* Also check for en_gpio = 0 to avoid re-setting the value
2023-11-28 20:40:51 -06:00
Ben Meadors
46bd6ca7ba
YAML based config for PI / Portduino (#2943)
* Add configuration via /etc/meshtastic/config.yaml

* Move example config, support more locations

* Fix config check

* Use access() to check for config file presence

* Throw an error and exit on radio init fail

* Adds error check for reading Bluetooth MAC

* Settle on meshtasticd, add install script

* Shell fixes

* Fine. I'll put it back and then disable you

* Get wrekt, shellchekt

* Firat attempt at adding raspbian CI build

* Tickle the workflow

* Beatings will continue til morale improves

* Permissions are overrated

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-11-18 08:12:34 -06:00
Jonathan Bennett
8df16ad6a6 Add ctime include to fix native compile 2023-11-08 14:36:12 -06:00
Ben Meadors
10265aabd5
Fix buggy phone positions (#2876)
* Guard-clause channel util. to reduce nesting

* Try-fix PhoneAPI position not updating

* Trunk

* Missed it

* Really disable GPS when asked to

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-10-09 18:33:04 -05:00
code8buster
7cebd79475
Use doNotEnterOff flag to prevent GNSS poweroff before fix acquisition (#2861)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-03 19:50:27 -05:00
Jonathan Bennett
aa38f53aed
Fix for T-Beam 1.2 GPS (#2858)
* Fix for T-Beam 1.2 GPS, with DEBUG enabled

* Don't break other devices

* Saving GPS data on this breaks on next boot. Fix.

* derp

* disable the extra verbosity

* Try the same sort of factory reset as the Lilygo image

* Catch GPS reboots and squash

* trunk

* GPS

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-03 12:05:40 -05:00
Manuel
f301e236eb
fix crash during shutdown (#2859)
* fix null pointer access

* ptr initialize
2023-10-03 06:37:46 -05:00
Jonathan Bennett
50db2d0e9b
Add timeout to ublox PMREQ command (#2851) 2023-10-01 20:39:18 -05:00
Jonathan Bennett
47c6738c0d
Fix GPS init bug -- power up even when disabled (#2850) 2023-09-30 23:38:51 -05:00
Jonathan Bennett
1a2c7f00e1
Gps cleanup and powersave (#2807)
* Refactor GPS to not probe if pins not defined

* Use Named Constructor to clean up code

* Move doGPSPowerSave to GPS class

* Make sure to set GPS awake on triple-click

* Cleanup and remove dead code

* Rename GPS_PIN_WAKE to GPS_PIN_STANDBY

* Actually put GPS to sleep between fixes

* add GPS_POWER_TOGGLE for heltec-tracker and t-deck

* Change GPS_THREAD_INTERVAL to 200 ms

* More dead code, compiler warnings, and add returns

* Add Number of sats to log output

* Add pgs enable and triple-click config

* Track average GPS fix time to judge low-power time

* Feed PositionModule on GPS fix

* Don't turn off the 3v3_s line on RAK4631
when the rotary is present.

* Add GPS power standbyOnly option

* Delay setting time currentQuality
to avoid strange log message.

* Typos, comments, and remove unused variable

* Short-circuit the setAwake logic on GPS disable

* heltec-tracker 0.3 GPS power saving

* set en_gpio to defined state

* Fix fixed_position logic with GPS disabled

* Don't process GPS serial when not isAwake

* Add quirk for Heltec Tracker GPS powersave

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
2023-09-23 23:45:35 -05:00
Jonathan Bennett
7eff5e7bcb
Fix for Pi Pico hang (#2817)
* Fix for Pi Pico hang

* Pi Pico fix part 2: Electric Boogaloo
2023-09-20 19:34:45 -05:00
Jonathan Bennett
8b82ae6fe3
refactor and avoid needless probe (#2799)
* Use UINT32_MAX to indicate no configured GPS

* Refactor GPS to not probe if pins not defined

* Minor cleanups related to rework

* Use Named Constructor to clean up code

* Actually disable the GPS thread

* Don't actually disable the GPS thread

* Move doGPSPowerSave to GPS class

* Make sure to set GPS awake on triple-click

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-16 23:10:10 -05:00
Jonathan Bennett
b02dd0e964
Move partial GPS initialization earlier in boot (#2788)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-12 16:46:46 -05:00
Jonathan Bennett
e1839e33f2
Lazy probe of GPS (#2781)
* First attempt at lazy config of GPS

* More GPS rework
Break GPS init into smaller, interruptable steps
Move more GPS commands into ubx.h
Combine Setup functions

* Move the rest of UBX messages to ubs.h
2023-09-10 22:21:14 -05:00
Jonathan Bennett
fd563e41f1
Add ubx-cfg-rxm and cfg-pm2 for ublock 6 powersave (#2777) 2023-09-07 12:24:21 -05:00
Jonathan Bennett
0fa3685161 Fix crash in GPS setup when GPS is disabled 2023-09-06 12:38:58 -05:00
code8buster
c91e306659 Move packet scratch declaration to header 2023-09-05 11:59:34 -04:00
code8buster
4ff343b20f no byte... just 8 unsigned bits please 2023-09-05 00:32:53 -04:00
code8buster
134fc75b67 UBX-RXM-PMREQ soft-off implemented 2023-09-05 00:26:42 -04:00
Jonathan Bennett
e943fffe8c GPS fixes
Work aroung Serial reset issue on ESP32
Don't send unsupported command to G60xx GPS
2023-09-04 15:00:05 -05:00
Jonathan Bennett
ac62330e1c Found lost byte dropped from moduleinfo
Attempt to fix CFG-GNSS for neo-6m
2023-09-03 22:38:03 -05:00
Jonathan Bennett
7ad94da1c6 Add more to GPS_DEBUG and fix ubx7 CFG-GNSS 2023-09-03 16:20:01 -05:00
Jonathan Bennett
ecdb75aae0 Correct UBX-CFG-PMS message 2023-09-03 02:16:29 -05:00
Jonathan Bennett
7c98445ca3 Cleanup in prep for commiting
Fix some compilation warnings
gate debug code behind GPS_DEBUG
minor fix in u-blox protocol detection
Begin to gate GPS messages based on protover
2023-09-03 01:50:11 -05:00
Jonathan Bennett
b21368ecfa Add delay and debug code for GPS probe 2023-09-02 20:35:38 -05:00
Jonathan Bennett
1a178c7d33 Add check for GPS Frame Errors message 2023-09-02 04:29:48 -05:00
Jonathan Bennett
5d6f0ea6c4 Fix possible edge case in GPS detection 2023-09-01 16:24:28 -05:00
Jonathan Bennett
6803fd7949 More fixes for GPS chips with unexpected baud 2023-09-01 12:11:39 -05:00
Jonathan Bennett
a61f969773 Increase GPS detection timeout slightly 2023-08-31 22:19:50 -05:00
Jonathan Bennett
cf762bbd42 Cut down delay times for GPS probe and init 2023-08-31 20:39:23 -05:00
code8buster
3d2c419d0d Remove leftover debug msg 2023-08-30 16:24:56 -04:00
Jonathan Bennett
903f619609 Add GPS serial speed scan 2023-08-28 19:01:14 -05:00
Jonathan Bennett
a42266f74b GPS: Fix checksum and remove spurious returns 2023-08-28 04:05:45 -05:00
code8buster
fcfd83bc89
Remove auto GPS shutoff for fixed position nodes (#2720) 2023-08-13 15:56:49 -05:00
Jonathan Bennett
d29c975e3c
Comment out extra-chatty debug message (#2715) 2023-08-12 13:51:31 -05:00
Jonathan Bennett
c44986127e
More GPS work (#2711)
Increase GPS buffer on esp32
Check for and flush GPS buffer when overfilled and corrupted.

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-08-12 09:29:44 -05:00
Jonathan Bennett
9470d4694b
Pickier parsing of NMEA to detect an L76K chip (#2699)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-08-10 11:21:35 -05:00
Neil Hao
42039e27e7
Initialize the L76K Chip, use GPS + GLONASS + BEIDOU (#2680)
* 'nano-g2-ultra'

* revert overcommit

* nano-g2-ultra-fmt

* revert overcommit

* revert overcommit

* Added BEIDOU support to L76K

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-08-06 08:28:37 -05:00
Thomas Göttgens
e0bf15b80e trunk fmt 2023-08-03 10:05:38 +02:00
Jm Casler
5f38e79b8f Add documentation to a few areas 2023-08-03 10:05:38 +02:00
Jonathan Bennett
06a6a992c2
GPS Fixes for nrf52 (#2675)
Expands board serial buffer from 64 (!) to 1024
Adds some debugging messages when problems are detected.
2023-08-02 10:08:59 -05:00
code8buster
8927cffd64
GPS log modifications (#2609)
* Move module info for use in functions outside of probe, refmt MON-VER message

* use checksum function in probe message

* Housekeeping on some comments, unsign the position ctr again
2023-07-17 20:27:14 -05:00
Manuel
ab32503601
Heltec-Tracker: GPS support (#2615)
* Heltec-Tracker: GPS support

* trunk fmt

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-16 16:57:14 -05:00
luzpaz
003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
Ben Meadors
4ace59fc18
Partial Heltec Wireless Paper and Wireless Tracker support (#2594)
* WIP

* Comment

* WIP

* TFT_CTRL

* Update platformio.ini

update to current latest version available

* Update EInkDisplay2.cpp

Is the e-ink Display a DEPG0213BN ?

* Logging

* trunk fmt

---------

Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
2023-07-14 16:12:30 -05:00
Dmitry Galenko
aa0b56e947
GPS: Implement Power Management, Refactor Code and Fix GSA Message Configuration for U-Blox hardware (#2606) 2023-07-12 19:35:41 -05:00
Ben Meadors
de53280ffc
PIN_GPS_EN power toggling (#2592)
* PIN_GPS_EN

* Remove extra digitalWrite

* GPS_POWER_TOGGLE macro enabled. Added WSLv3 too

* Update variant.h

* Update variant.h

* Fixed macro guard
2023-07-08 21:01:00 -05:00
Max-Plastix
da389eb787
Correct unused variable warning and typo around GNSS_MODEL_UNKNOWN (#2596)
* Small warning and typo cleanup.

* Update GPS.cpp (missed one instance of GNSS_MODEL_UNKONW)
2023-07-08 18:30:52 -05:00