Skip to content

Large section of L76X_Gat_GNRMC(self) does nothing #3

Description

@BritishTechGuru

This section of L76X_Gat_GNRMC(self) never ever executes. The only part that executes is after the except TypeError:

    try:
        for i in range(0, BUFFSIZE-71):
            if(ord(data[add]) == 36 and ord(data[add+1]) == 71 and (ord(data[add+2]) == 78 \
            or ord(data[add+2]) == 80) and ord(data[add+3]) == 82 and ord(data[add+4]) == 77 \
            and ord(data[add+5]) == 67):

end obfuscated section used to find $SGNYRMC

                    print("data printout")
                    print(data)
                    print("end of data prinout")
                    break
                    x = 0
                    z = 0
                    while(x < 12):
                        if(add+z >= BUFFSIZE-1):
                            return
                        if(ord(data[add+z]) == 44):#,
                            x = x + 1
                            if(x == 1):
                                Time = 0
                                for k in range(0, BUFFSIZE-1):
                                    if(add+z+k >= BUFFSIZE-1):
                                        return
                                    if(ord(data[add+z+k+1]) == 44):#,
                                        break
                                    if(ord(data[add+z+k+1]) == 46):#.
                                        break
                                    Time = (ord(data[add+z+k+1]) - 48) + Time*10
                                self.Time_H = Time/10000 + 8
                                self.Time_M = Time/100%100
                                self.Time_S = Time%100
                                if(self.Time_H >= 24):
                                     self.Time_H =  self.Time_H - 24
                            elif(x == 2):
                                if(ord(data[add+z+1]) == 65):#A
                                    self.Status = 1
                                else:
                                    self.Status = 0
                            elif(x == 3):
                                latitude = 0
                                for k in range(0, BUFFSIZE-1):
                                    if(add+z+k >= BUFFSIZE-1):
                                        return
                                    if(ord(data[add+z+k+1]) == 44):#,
                                        break
                                    if(ord(data[add+z+k+1]) == 46):#.
                                        continue
                                    latitude = (ord(data[add+z+k+1]) - 48) + latitude*10
                                self.Lat = latitude / 1000000.0
                            elif(x == 4):
                                self.Lat_area = data[add+z+1]
                            elif(x == 5):
                                longitude = 0
                                for k in range(0, BUFFSIZE-1):
                                    if(add+z+k >= BUFFSIZE-1):
                                        return
                                    if(ord(data[add+z+k+1]) == 44):#,
                                        break
                                    if(ord(data[add+z+k+1]) == 46):#.
                                        continue
                                    longitude = (ord(data[add+z+k+1]) - 48) + longitude*10
                                
                                self.Lon = longitude / 1000000.0
                            elif(x == 6):
                                self.Lon_area = data[add+z+1]
                                return#Completion calculation
                        z = z + 1
            add = add + 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions