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

Added a Negative Sign, Decrement Operator, and Fixed Multiple Bugs in Math Blocks #382

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

BjoernLuig
Copy link
Contributor

Added a Negative Sign, Decrement Operator, and Fixed Multiple Bugs in Math Blocks

Refactored Math Operations:

  • Removed the minus sign from single math operations and placed it in a separate block.
  • Added a dropdown to the increment operator to enable decrement functionality.

Additional Bug Fixes:

  • Resolved compilation errors by replacing Math.PI in trigonometry with M_PI.
  • Moved setTooltip() into generators as it does not work with functions (see #381). This is a workaround for know.
  • Worked around the absence of Blockly.Generator.Arduino.addInclude(...) and Blockly.Generator.Arduino.addFunction(...) in several cases.
  • Updated generators to use the new Blockly.Generator.Arduino.forBlock method.
  • Made minor language improvements and additions.
  • Enhanced the Tooltip Viewer with a more visually appealing design.
  • Reduced warnings in both TooltipViewer and CodeViewer.

@mariopesch
Copy link
Member

Looks good! Think there must be a way of updating the tooltip using the block function but as this works right now it should be fine

@BjoernLuig BjoernLuig merged commit b38d2a5 into development Jan 6, 2025
4 checks passed
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