Enhance AI
This commit is contained in:
parent
26a0fd884f
commit
26e48fd997
1 changed files with 208 additions and 69 deletions
|
|
@ -20,6 +20,7 @@ void startFrameLoop(FrameFunction function, uint8_t frameLengthInMilliseconds) {
|
|||
previousFrameTime = milisecondsSinceFrameStart;
|
||||
|
||||
while (milisecondsSinceFrameStart < frameLengthInMilliseconds) {
|
||||
clearBit(MCUCR, SM1); // idle mode
|
||||
sleep_cpu();
|
||||
}
|
||||
|
||||
|
|
@ -27,6 +28,10 @@ void startFrameLoop(FrameFunction function, uint8_t frameLengthInMilliseconds) {
|
|||
}
|
||||
}
|
||||
|
||||
void powerOff() {
|
||||
setBit(MCUCR, SM1); // power-down mode
|
||||
sleep_cpu();
|
||||
}
|
||||
|
||||
ISR(TIM0_COMPA_vect) {
|
||||
milisecondsSinceFrameStart++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue