Example #1
0
    def test_checksum_fails(self):
        p = GPHDG()
        p.checksum = '7E'
        p.nmea_sentence = "$GPHDG,190.7,,E,0.0,E*7E"

        result = p.check_chksum()

        self.assertFalse(result)
Example #2
0
    def test_checksum_fails(self):
        p = GPHDG()
        p.checksum = '7E'
        p.nmea_sentence = "$GPHDG,190.7,,E,0.0,E*7E"

        result = p.check_chksum()

        self.assertFalse(result)
Example #3
0
    def test_checksum_passes(self):
        p = GPHDG()
        p.checksum = '7F'
        p.nmea_sentence = "$GPHDG,190.7,,E,0.0,E*7F"

        result = p.check_chksum()

        self.assertTrue(result)
Example #4
0
    def test_checksum_passes(self):
        p = GPHDG()
        p.checksum = '7F'
        p.nmea_sentence = "$GPHDG,190.7,,E,0.0,E*7F"

        result = p.check_chksum()

        self.assertTrue(result)