Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. okneib
    O
    • Continue chat with okneib
    • Start new chat with okneib
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    okneib

    @okneib

    0
    Reputation
    1
    Posts
    169
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    okneib Follow

    Posts made by okneib

    • GPS: calculate deviation between two course

      Hi,
      I'm new to UIFlow and Pyhton and run into a problem:

      I get a course from GPS and store it (after button press) in courseset.
      After that I want to show the deviation but it cannot make the calculation:

      def buttonC_wasPressed():
      global setcourse, curcourse, coursediff, gps
      if curcourse:
      setcourse = curcourse
      label6.setText(str(setcourse))
      pass
      btnC.wasPressed(buttonC_wasPressed)

      curcourse = gps.course

      coursediff = curcourse - setcourse. // this line results in "Can't convert 'float' object to str implicitly"

      Any suggestions?
      Thanks!!!

      posted in UIFlow
      O
      okneib