-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO
201 lines (149 loc) · 8.72 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
- Cross-Read and correct comments. Finished files:
- dcf77.h
- dcf77.c
- datetime.h
- base.c
- base.h
- shift.c
- shift.h
- ldr.c
- ldr.h
- Log output of DCF77 is buggy as the same timings are output various time,
although internally nothing changed (check boundaries for fix), see below:
low active DCF77 Module detected!
45 88 78 88 79 89 88 89 88 78 78 88 78 77 78 89 88
89 78 89 78 88 78 78 88 88 89 78 78 89 88 89 88 88
88 88 78 89 89 89 78 88 78 88 78 78 89 88 89 88 78
78 88 88 77 77 77 77 77 77 77 77 77 77 77 77 77 165
165 165 165 165 165 165 165 165 165 165 165 165 253 DCF77 Reset
88 189 DCF77 Reset
89 78 78 88 78 78 88 78 88 78 79 78 78 78 78 88 88
89 79 88 78 78 78 78 88 88 87 78 89 89 88 88 88 88
88 87 78 88 88 88 78 88 78 88 78 79 89 88 89 88 78
78 88 88 78 88 89 89 189 1st DCF77 correct
DCF77 Reset
88 88 77 78 78 89 88 78 88 78 88 78 88 88 89 89 88
88 78 88 78 88 88 89 78 88 89 78 89 88 88 88 89 89
88 89 78 89 88 88 78 88 78 88 78 79 89 88 89 89 78
78 88 88 78 88 88 88 189 2nd DCF77 correct
DCF77 Reset
- Log output of DCF77 is _ugly_. There are two spaces between each output,
the lines get really long. Lines shouldn't get longer than 80 characters.
- Ambilight enable/disable times: Just like the clock itself there should
be an option to enable and/or disable the ambilight depending on the
time, so it can be activated in the evening.
- Make the determination of the DCF77 module type optional. Although this is
a nice gimmick, it only takes up program space and doesn't provide any real
use, as the module type should be known when actually building the clock
(basically all DCF77 receiver have an inverted output anyway), so it can be
compiled with the support for the right module, which in return would save
some considerable amount of program space and fasten up the initialization.
- Fix header includes: It seems that various includes are actually not needed.
- dcf77.h: Instead of dynamically building the header depending on the value
of DCF_PRESENT it actually would make more sense to not include the file
in the first place, when the DCF77 functionality is not needed.
- wceeprom: Use interrupt driven approach for writing data into EEPROM. Right
now it is quite possible that interrupts will be missed as writing to
EEPROM takes quite some time.
- Specify some coding styles for contributers, which will be based upon the
K&R indent style
- color: Check whether the conditional compilation (MONO_COLOR_CLOCK) is really
needed or if it would make more sense to not include it in the first place
when dealing with monochromatic clocks.
- color: Make hueWaveform() more general with a 2nd parameter asking for the
color, so its not working with green only.
- Add support for motion sensors, so that the Wordclock can be disabled and
will enable itself once there is someone in the surrounding.
- display.h: DisplayState: Move type declaration to specific clock definitions
- display.h: display_prefs: Consider creating access functions
- Combine display.* and display_wc.* files, as there is only a single
display type (wc), due to the fact that the display type "tix" has
been removed in the past.
- The whole conditional inclusion process within the display module is an ugly
hack. This should be done right by including only the file actually needed,
e.g. "display_wc_ger3.h" where ever functions of this file are needed. This
file should then in return include other files, e.g. "display.h", if needed.
- Demo mode: When switching from the multiplexing demo mode into the classical
one, the brightness seems to be at a maximum, although it wasn't before
entering this mode.
- display_wc_ger3.c:
- display_wc_eng.c:
- display_wc_ger.c:
- Make PROGMEM if more RAM is needed (+10B PROGMEM)
- display_wc_eng.c:
- display_wc_ger.c:
- Make more flexible
- Consider to put translationmatrix to flash
=> These points can be addressed by designing both modules similar to
display_wc_ger3.c.
- display.h: display_getNumberDisplayState() Add indicator once the counter
wraps around. The minute LEDs can be used, so the range covered can be four
times as big (1, 2, 3 or 4 minute LEDs enabled). This would make it possible
to display ranges from 1 to 48.
- Make use of copydoc Doxygen comment to avoid duplication:
- Various defines and/or entities within the display module are duplicated
- main.c: Error handling in the case of i2c_rtc_init returning false. Right now
only an error message via UART is output. Add an "error state" where the
minute LEDs would permanently blink red and the number shown on the display
would represent the fault. The manual can then explain what to do.
- display_wc_ger3.c: Add comments regarding the code itself
- Rename variables to get rid of the Hungarian notation
- dcf77: Think about a way to expose the current sync status of the module, so
other modules can actually check whether the time has been synchronized
successfully. This might be useful for the "jester mode" of
"display_wc_ger3.c" as it can be configured to enable itself on April 1st.
However the fact that DCF_PRESENT is set to 1, doesn't actually mean that
the time has been synchronized correctly in the past.
- dcf77: Fix the enable/disable logic to be more consequent. Right now the
module disables itself after having received two valid time frames in a row,
however it doesn't enable itself. This has to be done "manually" by invoking
dcf77_enable().
- user.c: Currently usermodes.c is simply included. Check whether it is
possible with a reasonable amount of time to outsource this into its own
module and include just the header. Also check the impact on code size.
- user: Think about saving the last state of Ambilight, Bluetooth and Aux after
reboot
- Fix artifacts on display when switching from fast demo mode into normal one.
- Come up with a suitable Makefile
- Look into making use of autotools
- Make use of git branches!
- pwm.c: Check whether it would make sense to adapt pwm_on() and pwm_off() to
make use of pwm_is_on.
- Look into making use of uCUnit.
- usermodes.c: NormalState::curHue: Calc current hue from RGB
- usermodes.c: Use unions to share memory between different states to reduce
static memory usage.
- base.c: incDecRangeOverflow(): Check whether it makes sense to overflow
on both ends, not only on the bottom, but also on the top.
- base.c: Check whether it makes sense to combine incDecRange() and
incDecRangeOverflow() into a single function with parameters for whether or
not to overflow
- user: UI_ONOFFTIMES_COUNT > 1 seems to be broken
- Fix Doxygen comments: For the most part the Doxygen comments were written
without actually rendering them. So there might be a vast amount of issues,
which prevent them from being displayed as intended. Go through them one by
one and check/fix them.
- The whole user module is kind of a mess: Its pretty big by now, its not
using function pointers, but a lot of functions with the same scheme. It
probably makes sense to rewrite this completely.
- When sending the "on" command directly after flashing the firmware, the
display gets disabled for a brief period of time, but reenables itself within
a second or so. This is also the case with the original firmware, so nothing
that was introduced by the changes itself.
- Implement "user_command_handle()" and let it handle all of the user commands.
Move advanced commands into this module, too, as it makes more sense and
the commands itself could probably be also triggered by other sources, e.g.
I2C.
- Synchronize various use cases of uart_puts(). As the uart module now works
asynchronously, debug output of various modules are not working correctly,
as the messages are too long.
- Once the UART protocol is fully implemented, make the IR remote control
optional saving a lot of program space.
- Implement EEPROM writeback after delay for UART protocol, too.
- uart_protocol: Make advanced mode optional during compilation
- When in normal mode and the color is changed "pa" will still return the
"active" preset, although it is no longer active anymore. This could be
problematic for applications to detect. It probably would make sense to
return an error when no preset is currently active.
- avr-libc 1.8.1 provides an own implementation of time.h, which includes
the tm struct. This should be used instead of the own datetime_t struct.