Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Bumming monochron code
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Bumming monochron code

by dataman on Mon Feb 22, 2010 2:12 pm

I know you're still in prerelease,
Which is probably good time to bum some less than optimal code...

Might I suggest anim.c line 618:
if (d & _BV(7-j)) {
glcdFillRectangle(x+i*2, y+j*2, 2, 2, !inverted);
} else {
glcdFillRectangle(x+i*2, y+j*2, 2, 2, inverted);
}

Could be replaced by:
glcdFillRectangle(x+i*2, y+j*2, 2, 2, (d & _BV(7-j)) ? !inverted : inverted);

Pretty decent memory savings.
I don't think the optimizer would catch that one.
It also reads a bit bitter.

dataman
 
Posts: 98
Joined: Wed May 20, 2009 7:03 pm

Re: Bumming monochron code

by EdA on Sat Feb 27, 2010 10:54 pm

How well does the default code fill up memory?
Is there room for hacks (like explosions on the hour...etc)?

Thanks,
/Ed
EdA
 
Posts: 2
Joined: Sat Feb 27, 2010 10:46 pm

Re: Bumming monochron code

by adafruit on Sun Feb 28, 2010 12:23 am

theres about 20K taken up with program code. a lot of that is graphics stuff and the menu system. so about 10K left for hackin'

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Please be positive and constructive with your questions and comments.