-
Notifications
You must be signed in to change notification settings - Fork 791
Generalizations on Metro_RP2350_Chips_Challenge for Fruit Jam #3094
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
Conversation
@jedgarpark probably needs to review the changes to the Larsio Paint Music files. Let me know if I should drop those changes from here and submit them as a separate PR. Both sets of changes are to support running in Fruit Jam OS but they are for different guides. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pylint errors are for except:
with no specific type of exception declared. We need either change those parts to use different logic, or else find the more specific type of error that the system will raise under those conditions and have the except block catch that more specific type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that should work fine for Chip's Challenge since the classes are all in the same folder.
I think return None makes sense, meaning there is no card. Then error catching statements in user code aren't needed then simplifying things just checking if a value is None. My 2 cents |
I would agree, implementing that will require a core change though and I think it would be nice to have Chips Challenge working on the Fruit Jam while a core solution is being implemented. |
Agreed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested larsio paint both as a Fruit Jam OS app, and in the root of CIRCUITPY and confirmed both are working as expected.
I think this is good to go.
I also double checked in both guides for any non-embedded code that would need to be updated to reflect these changes. |
This pull request addresses the issues identified in adafruit/Fruit-Jam-OS#32.
The "Fonts" and "Sounds" files were accessed using an absolute path from the root directory, this PR modifies that so the files are accessed from a relative path from the directory the code.py file is executed from. This should not have any impact on running the standalone code file as described in the learn guide but will also allow the code to be run from a sub folder as is done in Fruit Jam OS.
The original code used specific pins wired to the TLV320DAC3100 I2S audio breakout. This PR first attempts to initialize the DAC using typical pin names for boards that have built in I2S boards and only if that fails, falls back to the original pins defined in the learn guide.
The original code attempted to mount an SD card to save "save states" on. The core will now auto mount SD cards for boards with installed SD slots. This was causing the original code to crash when it attempted to mount the SD card that was already mounted. This PR changes the games mount function to first attempt to perform a storage.remount and if successful simply return indicating the mount was successful. If the remount isn't successful the original function to attempt and SD card mount is performed.