Example #1
0
def launch_app():
    log = open("PiMFD.log", "w")

    try:
        # Initialize our settings. This will create a default settings file if none exists
        app_options = MFDAppOptions()
        app_options.load_from_settings()
        app_options.save_to_settings()

        app_options.profile = True

        # Build a display using the standard windowed sizes. This is great for desktop testing.
        display = DisplayManager()
        display.is_fullscreen = False

        # Launch
        display.start_mfd(app_options)

    except:
        error_message = "Unhandled error {0}\n".format(
            str(traceback.format_exc()))

        print(error_message)
        log.write(error_message)

    finally:
        log.close()
        pass
Example #2
0
from PiMFD.Options import MFDAppOptions
from PiMFD.UI.DisplayManager import DisplayManager

__author__ = 'Matt Eland'

log = open("PiMFD.log", "w")

try:
    # Initialize our settings. This will create a default settings file if none exists
    app_options = MFDAppOptions()
    app_options.load_from_settings()
    app_options.save_to_settings()

    # Build a display using the standard windowed sizes. This is great for desktop testing.
    display = DisplayManager()
    display.is_fullscreen = False

    # Launch
    display.start_mfd(app_options)

except:

    error_message = "Unhandled error {0}\n".format(str(traceback.format_exc()))

    print(error_message)
    log.write(error_message)

finally:
    log.close()
    pass
Example #3
0
from PiMFD.UI.DisplayManager import DisplayManager
from PiMFD.Options import MFDAppOptions


__author__ = 'Matt Eland'

log = open("PiMFD.log", "w")
try:
    # Initialize our settings. This will create a default settings file if none exists
    app_options = MFDAppOptions()
    app_options.load_from_settings()
    app_options.save_to_settings()

    # Create a new display in fullscreen mode without specifying resolution. Resolution will be auto-detected.
    display = DisplayManager(None, None)
    display.is_fullscreen = True

    # Launch!
    display.start_mfd(app_options)

except Exception as e:
    error_message = "Unhandled error {0}\n".format(str(traceback.format_exc()))

    print(error_message)
    log.write(error_message)

finally:
    log.close()
    pass
Example #4
0
log = open("PiMFD.log", "w")

try:
    # Initialize our settings. This will create a default settings file if none exists
    app_options = MFDAppOptions()
    app_options.load_from_settings()
    app_options.save_to_settings()
    app_options.save_map_to_disk = False

    # We really need to conserve space here
    app_options.font_scaling = 7
    app_options.min_font_size = 8

    # Create a new display in fullscreen mode without specifying resolution. Resolution will be auto-detected.
    display = DisplayManager(None, None)
    display.frames_per_second = 30
    display.show_mouse = False
    display.is_fullscreen = True
    display.start_offset = 8, 0
    display.end_offset = 255, 2

    # Launch!
    display.start_mfd(app_options)

except Exception as e:
    error_message = "Unhandled error {0}\n".format(str(traceback.format_exc()))

    print(error_message)
    log.write(error_message)
Example #5
0
from PiMFD.Options import MFDAppOptions
from PiMFD.UI.DisplayManager import DisplayManager

__author__ = 'Matt Eland'

log = open("PiMFD.log", "w")

try:
    # Initialize our settings. This will create a default settings file if none exists
    app_options = MFDAppOptions()
    app_options.load_from_settings()
    app_options.save_to_settings()

    # Build a display using the standard windowed sizes. This is great for desktop testing.
    display = DisplayManager()
    display.res_x = 480
    display.res_y = 320
    display.allow_resize = False
    display.is_fullscreen = False  # TODO: Once this is more developed, this should probably be True

    # Launch
    display.start_mfd(app_options)

except Exception as e:

    error_message = "Unhandled error {0}\n".format(str(traceback.format_exc()))

    print(error_message)
    log.write(error_message)
Example #6
0
__author__ = 'Matt Eland'

log = open("PiMFD.log", "w")

try:
    # Initialize our settings. This will create a default settings file if none exists
    app_options = MFDAppOptions()
    app_options.load_from_settings()
    app_options.save_to_settings()

    # We really need to conserve space here
    app_options.font_scaling = 4
    app_options.min_font_size = 6

    # Build a display using the standard windowed sizes. This is great for desktop testing.
    display = DisplayManager()
    # display.res_x = 320
    #display.res_y = 320
    display.padding_x = 8
    display.padding_y = 6
    display.frames_per_second = 30
    display.allow_resize = False
    display.is_fullscreen = True  # TODO: Once this is more developed, this should probably be True

    # Launch
    display.start_mfd(app_options)

except Exception as e:

    error_message = "Unhandled error {0}\n".format(str(e))