Skip to content

Added variable recoding / tone support / Dutch translation#64

Open
sdmeijer wants to merge 17 commits intoedutec:masterfrom
sdmeijer:master
Open

Added variable recoding / tone support / Dutch translation#64
sdmeijer wants to merge 17 commits intoedutec:masterfrom
sdmeijer:master

Conversation

@sdmeijer
Copy link
Copy Markdown

I've added Dutch translations for Snap4Arduino.

Variables outside of the loops (i.e. for holding pin numbers) are now declared and assigned in the head (before setup()).
Also type detection is build in (only int and char) for variables outside of the loops.
Assigning an analog pin number to a variable results in a int declaration of the variable (as necessary by Arduino).

Changed the regex for the pin number detection (digitalRead, digitalWrite, servo), so that variables can be used.
@sdmeijer
Copy link
Copy Markdown
Author

I've also changed this:

Variables outside of the loops (i.e. for holding pin numbers) are now declared and assigned in the head (before setup()).
Also type detection is build in (only int and char) for variables outside of the loops.
Assigning an analog pin number to a variable results in a int declaration of the variable (as necessary by Arduino).

Changed the regex for the pin number detection (digitalRead, digitalWrite, servo), so that variables can be used.

…fine a melody (these blocks needs to stay OUTSIDE of the loop(). In the Arduino category is a new block to play the defined melody).

+ Some improvements on variable recoding
+ Added Dutch language to installer
+ Updated Dutch language
@sdmeijer sdmeijer changed the title Added Dutch-translations Added variable recoding / tone support / Dutch translation Aug 23, 2015
@sdmeijer
Copy link
Copy Markdown
Author

These alterations work in S4A-mode, not tested with Firmata (I'm sure the tone capabilties won't work).
Is it possible to hide certain blocks in 'normal' mode and only show them in S4A-mode?

@bromagosa
Copy link
Copy Markdown
Collaborator

@sdmeijer, I can't pull this yet as there are some things I believe you added to this pull request by mistake (like Set default language to 'nl'.). Also, could you separate these into different pull requests? We may want to review some of these changes before pulling them, so having them split would make things a lot easier for us. Also, I believe it's "customary Git etiquette" to have separate pull requests for separate features and bugfixes. ;)

Namely: Dutch translation, changes to the Arduino preprocessor, and note blocks (not sure what to do with those, as Firmata doesn't expose these functions and our policy is that the Arduino "dumb" mode should be "dumber" than the dynamic one).

Thanks a lot!

@sdmeijer
Copy link
Copy Markdown
Author

Hi @bromagosa,
After creating the pull request, I did some commits. GitHub added these automatically to my pull request which wasn't my intention.
I don't know how to separate them. Only my first two commits (sdmeijer@6d33d6a and sdmeijer@16b2d6b) should be in the pull request.

Added new blocks and features
Now capable of doing what I want.

ToDo:
- nested loops
- remove extra spacing before int
- auto start in Arduino-mode
- upload to Arduino???
};

// Add attributes to original SnapTranslator.dict.nl
for (var attrname in s4aTempDict) { SnapTranslator.dict.nl[attrname] = s4aTempDict[attrname]; }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So sorry! Since I moved Snap4Arduino into a new repo I had completely forgotten about these pull requests!

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