• GPS Setup is pretty much ready. I have most of the code in my repository.
    Switched to using promises and noticed that I dont think the delay() function is working as expected.

    LOG USING EXISTING (hacky loop) METHOD

      >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v08.167 (c) 2019 G.Williams
    1612906951505.60473632812 : loadSettings()
    1612906951580.55590820312 : [object Object]
    1612906960116.4140625 : exitSetup()
    1612906960118.94702148437 : [object Object]
    1612906960754.65869140625 : setupGPS() PSMOO  <<== time between
    1612906961038.22802734375 : Powering GPS Off  <<== is 284ms
    
    see 'Configuring GPS' message
    

    CONSOLE LOG USING PROMISES

    >
    
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v08.167 (c) 2019 G.Williams
    1612907245516.38134765625 : loadSettings()
    1612907245591.24096679687 : [object Object]
    1612907262076.53149414062 : exitSetup()
    1612907262078.91186523437 : [object Object]
    1612907262716.82080078125 : setupGPS() PSMOO <<==  time between 
    1612907262723.29052734375 : Powering GPS Off <<==  is 7ms
    ERROR: Invalid RX or TX pins
    ERROR: Invalid RX or TX pins
    ERROR: Invalid RX or TX pins
    ERROR: Invalid RX or TX pins
    >
    
    

    The 4 ERROR: Invalid RX or TX pins messages look like they are a response to config commands being sent too fast to the GPS. Also the time between calling setupGPS() and 'Powering off GPS' log message is only 7ms with the promises code.

About

Avatar for HughB @HughB started