pyonair/PyonAir-pycom

Repair overrride later

github-actions opened this issue · 1 comments

Repair overrride later

Override Preferences - DEVELOPER USE ONLY - keep all overwrites here

status_logger.warning("Overriding configuration with the content of debug_config.json")

with open('/flash/debug_config.json', 'r') as f:

config.set_config(ujson.loads(f.read()))

status_logger.warning("Configuration changed to: " + str(config.get_config()))

Check if GPS is enabled in configurations

Check if device is configured, or SD card has been moved to another device

#TODO: Repair overrride later

    add a corresponding decoder to the back-end."""
    config.save_config({"fmt_version": 1})

    #TODO: Repair overrride later
    # Override Preferences - DEVELOPER USE ONLY - keep all overwrites here
    # if 'debug_config.json' in os.listdir('/flash'):
    #     status_logger.warning("Overriding configuration with the content of debug_config.json")
    #     with open('/flash/debug_config.json', 'r') as f:
    #         config.set_config(ujson.loads(f.read()))
    #         status_logger.warning("Configuration changed to: " + str(config.get_config()))

    # Check if GPS is enabled in configurations
    
    if config.get_config("GPS") == "OFF":
        gps_on = False
    else:
        gps_on = True



    #=======REmove this config stuff === warn this devide id may be used -- check
    # Check if device is configured, or SD card has been moved to another device

9e40503065b9f660cf6a83f44417a0edacaa0f08