Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Major] allow to load mocks on non-rpi systems #373

Merged
merged 3 commits into from
Aug 27, 2024

Commits on Aug 2, 2024

  1. [New] allowing configuring shutdown hook

    The shutdown hook is hooked into the JVM and is executed when the JVM stops.
    
    This can be beneficial when the application is not managing pi4j's life cycle, but when an application wants to properly manage the life cycle, then this can be detrimental to the shutdown sequence of the application.
    
    This change allows such an application to disable this feature.
    
    The shutdown hook is still enabled by default, a future version might decide to disable it by default.
    eitch committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    388ff8b View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Configuration menu
    Copy the full SHA
    1535055 View commit details
    Browse the repository at this point in the history
  2. [Major] allow to load mocks on non-rpi systems

    This removes the
    
        Pi4J.newAutoContextAllowMocks()
    
    function, as we now detect these systems using:
    
        BoardInfoHelper.runningOnRaspberryPi()
    
    This is a breaking API change, but should satisfy people having to write special code to load the mock in tests, as this happens automatically now.
    
    If a mock is to be loaded on the Raspberry Pi, then one can still do this using the following code:
    
        Pi4J.newContextBuilder().autoDetectMockPlugins().build();
    eitch committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    9822afa View commit details
    Browse the repository at this point in the history