Skip to content

Conversation

@FoamyGuy
Copy link
Collaborator

Allows the user to import a logic_gates_import.json file from CIRCUITPY into a specified save slot. This makes it possible to share save files thru the internet or any text exchange medium and get them loaded into the simulator. I used it initially on the examples provided in #3147

I will up the relevant guide page at same time as this is merged.

Copy link
Contributor

@RetiredWizard RetiredWizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once I made the change to the open, the import worked great.

Edit: I'm running the app as a Fruit Jam OS app so my default folder wasn't root.....

# update the message to the user with the value they typed
self.message_lbl.text += key_str
if "logic_gates_import.json" in os.listdir("/"):
with open("logic_gates_import.json", "r") as f:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with open("/logic_gates_import.json", "r") as f:
Comment

I needed to add the slash here....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for trying this out! this is fixed int he latest commit to have the absolute path root slash. Good catch, I've been testing it directly instead of under FJOS, though that is a good reminder I think I haven't added logic gates to the list in FJOS repo yet.

Copy link
Contributor

@RetiredWizard RetiredWizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me....

@FoamyGuy FoamyGuy merged commit da4c52d into adafruit:main Oct 31, 2025
4 checks passed
@FoamyGuy
Copy link
Collaborator Author

Guide is updated now with details on SignalTransmitter and SignalReceiver as well as the new import functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants