Skip to content

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
@Thiemann96 Thiemann96 deleted the negatives-in-math branch August 19, 2025 09:18
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