Skip to content

Conversation

@microbit-carlos
Copy link
Contributor

Very minor update so that the bigger blocks with if statements only to print debug info are 100% not compiled when ML_DEBUG_PRINT is disabled (the compiler should take care of that, but this little extra check doesn't cost anything).

No rush, can sit here until you have to for review.

autogenerated.ts Outdated
return result;
};

simulatorSendData();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also added this to the default autogenerated.ts, assuming it is needed, but not really tested it with the simulator itself.
Happy to remove it if it's better without it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need this line. The simulatorRegister() call kicks things off. When the simulator is rendered it asks this extension for the data, so simulatorSendData() is only triggered in response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this line might still be generated in the autogenerated.ts file (or at least the files generated in the ml4f-test-header branch), should it be removed from there as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, good catch. Needs testing after the change, but I'm confident that's the right thing to do.

@microbit-carlos microbit-carlos marked this pull request as ready for review October 31, 2024 17:29
Copy link
Collaborator

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

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

Let's remove the added simulatorSendData(); line.

The other changes look good.

Copy link
Collaborator

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM.

@microbit-carlos microbit-carlos merged commit 49834ae into main Nov 1, 2024
2 checks passed
@microbit-carlos microbit-carlos deleted the minor-updates branch November 1, 2024 09:43
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.

3 participants