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

Post-DC26 Wrench Fox Python Code Updates #11

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

darkgrue
Copy link

@darkgrue darkgrue commented Aug 30, 2018

I've added an Excel spreadsheet to help build and visualize the font and emote bitmaps. At the same time, I've corrected some of the inconsistencies and errors I found in the bitmaps. I've also added a sample additional font, which is a slightly modified version of the public-domain font, micro-machina.

I've added a randomization function to the boop to display a few other emotes rarely.

Most significant change is refactoring the way that fonts and animations are loaded. I've changed the code to move fonts into modules, and now they load automatically from a directory (in order to save memory, only the fonts in-use are loaded - currently settings.emotefont and settings.scrollfont). Add a file to the fonts directory that contains a dictionary named "font" with the bytearray mappings - you automagically add a font with that name. The animations directory works similarly: Python and JSON files will do the same. Drop a file in, add an animation. No editing of files no explicit import statements. Huge improvement. Also, this was an enormously difficult hack, this method of loading modules appears to be explicitly discouraged by Python's idiom, which makes this change controversial. However, it makes the addition of both animations and fonts extremely user-friendly (as well as their disablement, as changing the extension, rather than deletion is all that's necessary to prevent a module from loading).

I've added a reverse-engineered OpenSCAD version of the LED shield. This version adds parameterized LED window scaling, and taper (straight-wall cuts being ideal for laser-cutting shields). New edge clips have been added, that much more aggressively hold on the shield. The resultant STL files inherently correct error in the original file's mesh (overlapping triangles), and correct the orientation to one suitable for printing.

Lastly, I've made a few corrections, removing typos, making the formatting more consistent (at least in the files I changed), and adding some additional status output to the serial console.

darkgrue and others added 14 commits August 25, 2018 13:40
updated awoo bitmap
updated beep bitmap
added derp bitmap
corrected missing comma in prebuilt array
5% chance of "derp"
5% chance of "beep"
added fonts\ directory
added modified version of micro-machina font bitmaps
fixed existing font issues
added diagnostic messages
packages now load dynamically from directories
only load font(s) enumerated by settings.emotefont and settings.scrollfont
refactored font5var to move letter spacing from font to the scrolling text animation module
corrected typos in fonts
reverse-engineered version of the led-shield.stl file
adds parameterized LED window scaling, and taper
new edge clips
new STL files inherently correct error in the original file's mesh (overlapping triangles)
added STL files for clip shield for outline, dive goggles, horizontal and vertical slats
updated OpenSCAD file to generate same
added STL files for clip shield for outline, dive goggles, horizontal, full horizontal, and vertical slats
updated OpenSCAD file to generate same
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.

1 participant