Permalink
Browse files

minor adjustment of the display angle

  • Loading branch information...
1 parent 050bc2b commit 9bb8b1fa59c6f57f99841bfc003b02249fbcd68f @wertarbyte committed Feb 17, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 hdclock.c
View
@@ -38,6 +38,8 @@
#define PMAX UINT8_MAX
#define PMOD (PMAX+1)
+#define P_ADJUST 9
+
#define P_VISIBLE ((PMOD*3)/4)
#define P_OFFSET (1*(PMAX+1)/8)
@@ -320,7 +322,7 @@ int main(void) {
}
// where are we exactly?
- pos = PMOD-( ((((((uint32_t)getCounter())<<16) / duration)*PMAX)>>16)+P_OFFSET ) % (PMOD);
+ pos = PMOD-( ((((((uint32_t)getCounter())<<16) / duration)*PMAX)>>16)+P_OFFSET+P_ADJUST ) % (PMOD);
// are we inside the covered section?
if (pos >= P_VISIBLE) {
PORT_LEDS |= 1<<NUM_LEDS;

0 comments on commit 9bb8b1f

Please sign in to comment.