Commit graph

232 commits

Author SHA1 Message Date
dherrada
b1e5ec0e75 Did patch 2021-11-10 17:27:45 -05:00
dherrada
25375c10d9 Updated readthedocs file
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-11-09 15:28:08 -05:00
Dylan Herrada
f357c047d1
Updated readthedocs requirements path 2021-11-08 15:59:41 -05:00
Scott Shawcroft
b5b18fa2f2
Merge pull request #69 from theendlessriver13/add-tests
Add unit tests
2021-10-26 09:25:36 -07:00
Jonas Kittner
9d70a8d176 run tests in gha 2021-10-26 00:16:28 +02:00
Jonas Kittner
1cc7829e1b add unit tests 2021-10-26 00:16:28 +02:00
Scott Shawcroft
64d5699910
Merge pull request #70 from theendlessriver13/fix-byte-indexing
fix bug where byte str comparision was done incorrectly
2021-10-25 14:36:30 -07:00
foamyguy
2f7c47a45b add docs link to readme 2021-10-25 11:16:19 -05:00
Jonas Kittner
845d4388fc fix bug where byte str comparision was done incorrectly 2021-10-21 19:15:44 +02:00
Scott Shawcroft
4a7932fda8
Merge pull request #71 from theendlessriver13/update-pre-commit
update pre-commit conifiguration to avoid using the local escape hatch
2021-10-21 09:53:49 -07:00
Jonas Kittner
ff798a1511 update pre-commit conifiguration to avoid using the local escape hatch 2021-10-20 21:39:54 +02:00
dherrada
ca3885aeac Globally disabled consider-using-f-string pylint check
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-09-24 13:27:44 -04:00
Kattni
f7c9e717cf
Merge pull request #67 from theendlessriver13/has_fix
fix bug where `has_fix` remained `True` even though the fix was lost
2021-09-24 13:15:21 -04:00
Jonas Kittner
5e442be906 fix bug where has_fix remained True even though the fix was lost 2021-09-23 18:58:39 +02:00
Scott Shawcroft
3655448670
Merge pull request #66 from lesamouraipourpre/rmc
Update RMC parsing to handle the extra parameter in NMEA 4.1
2021-09-07 13:24:37 -07:00
James Carr
ccc0e463c2
Minor update to simpletest, it is geoid not geo ID. 2021-09-06 10:26:26 +01:00
James Carr
e75769882b
Update RMC parsing to handle the extra parameter in NMEA 4.1 (Closes #65) 2021-09-06 10:25:58 +01:00
dherrada
d9a07936c1 Moved default branch to main 2021-06-07 14:26:55 -04:00
dherrada
f0dd952f23 Moved CI to Python 3.7
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-05-24 11:39:46 -04:00
dherrada
0399266fe5 Added help text and problem matcher
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-05-19 15:19:58 -04:00
dherrada
d770e6bb94 Added pull request template
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-05-19 14:08:20 -04:00
Dylan Herrada
e6cef0517d
Merge pull request #59 from lesamouraipourpre/pylint-yaml
Update the pre-commit and github workflow to move pylint to pre-commit.
2021-05-13 16:55:59 -04:00
Scott Shawcroft
f95ca0de91
Merge pull request #62 from lesamouraipourpre/minimum_sentence_size
Change the minimum sentence length to 11
2021-04-26 13:40:53 -07:00
James Carr
2b98d77f63
Change the minimum sentence length to 11 (Closes #56) 2021-04-25 21:36:09 +01:00
dherrada
81efc56ae5 "Increase duplicate code check threshold
"
2021-03-19 13:48:38 -04:00
Scott Shawcroft
cc4c9dffc7
Merge pull request #60 from lesamouraipourpre/length-data-type-check
Add a check on the length of the datatype
2021-03-15 14:15:58 -07:00
Jeff Epler
6fa737e2de
Merge pull request #61 from lesamouraipourpre/docs2
Update doumentation
2021-03-15 08:58:59 -05:00
James Carr
d057746c8f Add license for details.rst 2021-03-15 11:14:11 +00:00
James Carr
7d2a3a0556 Update documentation 2021-03-15 11:06:41 +00:00
James Carr
e98fd750b1 Add a check on the length of the datatype 2021-03-13 15:37:13 +00:00
dherrada
4f1c2cb827 Revert "[WILL BE REVERSED] Making change to test adabot release check"
This reverts commit e4348ae00a.
2021-03-09 17:06:42 -05:00
Dylan Herrada
e4348ae00a
[WILL BE REVERSED] Making change to test adabot release check 2021-03-09 16:25:46 -05:00
Scott Shawcroft
fd9d92a0be
Merge pull request #57 from lesamouraipourpre/bad-sentences
Fail bad sentences that pass the CRC check
2021-03-08 15:01:14 -08:00
dherrada
0c13b9fc4b Re-added pylint install to build.yml
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-03-02 17:39:32 -05:00
dherrada
c32362e907 Removed pylint process from github workflow
Signed-off-by: dherrada <dylan.herrada@adafruit.com>
2021-03-02 17:15:20 -05:00
James Carr
15415ca9ad Revert changes to get examples to pass pylint. This should be fixed when the pre-commit gets updated. 2021-03-02 07:20:19 +00:00
James Carr
aa947cd671 Changes requested by @dherrada 2021-03-01 23:28:14 +00:00
James Carr
1bde4ad2f6 Update the pre-commit and github workflow to move pylint to pre-commit.
Disable duplicate-code check in examples.
2021-03-01 09:55:58 +00:00
James Carr
6da1add986 Move the args.split() call up a level to reduce memory usage. 2021-03-01 08:43:48 +00:00
James Carr
e0d9f3d3f7 Replace _SENTENCE_PARAMS dictionary with a tuple of compacted strings to reduce memory usage. 2021-03-01 08:36:50 +00:00
James Carr
ad6930a0a6 Add PyLint disable=duplicate-code to all examples. 2021-02-25 12:37:43 +00:00
James Carr
07d483899a Add PyLint disable=duplicate-code to time_source. 2021-02-25 12:25:33 +00:00
James Carr
23b2df8960 Modify the time_source example so that it doesn't trigger a PyLint duplicate warning. 2021-02-25 12:08:49 +00:00
James Carr
037be6ebf3 Black/PyLint pass 2021-02-24 23:34:15 +00:00
James Carr
92efe69f54 Missing return statement. Thank you, PyLint. 2021-02-24 23:18:22 +00:00
James Carr
2f79c44ef6 Typo. Thank you, PyLint 2021-02-24 23:13:17 +00:00
James Carr
2cc44731e4 Pass the debug value into _parse_data 2021-02-24 23:10:46 +00:00
James Carr
91f584689a Correct some of the RMC parameter types. 2021-02-23 23:01:02 +00:00
James Carr
632dc4a1b1 Use longitude for longitude, not latitude. D'Oh! 2021-02-23 22:48:32 +00:00
James Carr
7a59234e2e Refactor the sentence parsing (Fixes #55)
Refactor the date and time parsing into a method
Add an instance variable self.mode_indicator
Add an instance variable self.magnetic_variation

Sentence Parsing:
1) Read the sentence from I2C/UART (No change)
2) Validate the CRC, else fail (No change)
3) Call _parse_[SENTENCE_TYPE](), if the sentence was from a GNSS, else return True
4) The data length is compared against it's expected length, else fail
5) These then call _parse_data(PSEUDO_SENTENCE_TYPE,DATA)
6) The data is converted into the expected parameter types, else fail

PSEUDO_SENTENCE_TYPE is usually SENTENCE_TYPE, but can be modified for
a SENTENCE_TYPE with variable data length.

The update() method returns True if:
  The sentence passes CRC AND
    Not from A GNSS (No parsing happens) OR
    From a GNSS, with a handled sentence type which passes parsing OR
    From a GNSS, with an unhandled sentence type (No parsing happens)
Else False
2021-02-23 21:49:35 +00:00