aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-10Reduce CPU frequencyLars-Dominik Braun6-45/+53
Also reduces PWM frequency. The speakers resonance frequency is 2kHz, with 1MHz clock speed and prescaler 256 we get pretty close.
2015-01-29Replace enums with uint8_tLars-Dominik Braun6-46/+55
Saves a few bytes, since enums are 16 bit
2015-01-29accel: Ignore shake if horizon changedLars-Dominik Braun1-2/+9
2015-01-29accel: Fix shake detection, againLars-Dominik Braun1-8/+13
Only two peaks are required. Use int16 to avoid overflow. Check sign before registering shake in other direction.
2015-01-20i2c: twRequests returns false if bus is busyLars-Dominik Braun2-21/+25
2015-01-20ui: Increase wait time between confirm flashesLars-Dominik Braun1-2/+3
2015-01-20Generic LED flash modeLars-Dominik Braun1-23/+84
Adds support for confirming selections by flashing LEDs.
2015-01-20gyro: Fix non-blocking startLars-Dominik Braun1-23/+31
The I2C bus may not be free when starting the gyro. Add two additional states.
2015-01-20timer: Fix one-shot modeLars-Dominik Braun1-3/+4
2015-01-13Remove debugging puts/fwriteLars-Dominik Braun3-28/+3
We’re tight on SRAM and the stack seems overflow from time to time. Removing the strings should give us some breathing room.
2015-01-13Add generic flash ui state, fix timer race conditionLars-Dominik Braun3-75/+119
2014-12-15ui: Reduce required shake count to 1Lars-Dominik Braun1-3/+3
Gesture detection has been fixed with commit 254fb0c490c62c0e29518cab2d8b5c90a30b378c, one shake now actually sets the counter to one.
2014-12-15pwm: Add method to switch all LEDs offLars-Dominik Braun3-32/+24
This is used quite often and we can implement it more efficiently.
2014-12-15ui: Switch off LEDs when going into select_coarseLars-Dominik Braun1-1/+5
We’re starting with a value of 0.
2014-12-15ui: Use flashing alarmLars-Dominik Braun1-11/+58
2014-12-09gyro: non-blocking start/stop, enable only when requiredLars-Dominik Braun3-35/+67
Save energy by disabling the gyro most of the time (i.e. not in selection mode).
2014-12-09accel: Fix shake gesture detectionLars-Dominik Braun3-51/+53
2014-11-25gyro/accel: Disable pull-upsLars-Dominik Braun2-10/+8
Not sure they are needed.
2014-11-25gyro: Reduce sensitivityLars-Dominik Braun1-3/+3
2014-11-11ui: Update leds when switching to fine selectionLars-Dominik Braun1-26/+33
2014-11-11ui: Fix debug messagesLars-Dominik Braun1-7/+4
2014-11-11ui: Simplify accelLars-Dominik Braun1-2/+1
2014-11-11pwm: Respect PB0/1’s value set by gyroLars-Dominik Braun2-1/+9
2014-11-11Fix i2c out of bounds writeLars-Dominik Braun1-3/+3
Fixes longstanding bug that caused strange behavior wrt LED’s states.
2014-09-30Unify entering idle stateLars-Dominik Braun1-17/+19
2014-09-30Fix theoretical LED step edge caseLars-Dominik Braun1-1/+1
2014-09-30Limit fine value rangeLars-Dominik Braun1-1/+7
2014-09-30Fix timer return valueLars-Dominik Braun1-1/+1
2014-09-30Reliable reboot, idle status LED indicatorLars-Dominik Braun4-14/+29
2014-09-30LED error code for assert()Lars-Dominik Braun2-4/+18
2014-09-30Add wakeup source mechanismLars-Dominik Braun9-24/+67
Should reduce amount of cpu wakeups with expensive computations.
2014-09-16timer: Support timeouts > 8sLars-Dominik Braun2-13/+64
2014-09-16Auto stop alarmLars-Dominik Braun1-4/+10
Currently triggers assert in timer.c
2014-09-16Finally fix speakerLars-Dominik Braun7-134/+62
Use one timer for LED/speaker. Not sure why two did not work.
2014-08-26speaker: Fix beepLars-Dominik Braun1-9/+20
Finally beeps. XXX: nope, it does not.
2014-08-19Add AVRdude terminalLars-Dominik Braun1-0/+3
2014-08-19Switch to new timer, fix usabilityLars-Dominik Braun1-62/+102
Seems to work so far, gyro is a little too sensitive.
2014-08-19timer: Support arbitrary timer valuesLars-Dominik Braun2-16/+32
FIXME: large values do not work yet.
2014-08-05pwm: Add brightness controlLars-Dominik Braun2-54/+55
2014-07-29i2c: Make sure status is _OKLars-Dominik Braun3-4/+4
Not sure if this fixes anything.
2014-07-22Use “volatile” on struct membersLars-Dominik Braun2-7/+7
Not all struct members are written in an ISR.
2014-07-22Convert printf into putsLars-Dominik Braun8-30/+37
Removes ~1.5k code size, still not working.
2014-07-22Speaker and LED pwmLars-Dominik Braun7-38/+73
Something is not correct here, stack overflow?
2014-07-08Enable assert messagesLars-Dominik Braun2-1/+4
2014-07-08Coarse/fine selection modesLars-Dominik Braun2-71/+90
2014-06-17Alarm state + defines + documentationLars-Dominik Braun3-23/+62
2014-06-17Translate LED id’s based on orientationLars-Dominik Braun1-8/+19
And fix orientation change detection.
2014-06-17ui: AddedLars-Dominik Braun8-48/+261
Seems to work mostly now.
2014-06-10pwm: Implement blinkLars-Dominik Braun2-42/+75
Still flickers a little bit, might have to increase frequency…
2014-05-27Fix compiler warningsLars-Dominik Braun9-16/+23