mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Count time in phase correctly.
This commit is contained in:
parent
0f8bc416d1
commit
bbc0d8b050
@ -192,6 +192,7 @@ struct Video {
|
|||||||
}
|
}
|
||||||
|
|
||||||
phase_ = new_phase;
|
phase_ = new_phase;
|
||||||
|
time_in_phase_ = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,9 +230,9 @@ private:
|
|||||||
uint32_t position = 0;
|
uint32_t position = 0;
|
||||||
Phase phase = Phase::Sync;
|
Phase phase = Phase::Sync;
|
||||||
|
|
||||||
void increment_position(int divider) {
|
void increment_position(uint32_t divider) {
|
||||||
++position;
|
++position;
|
||||||
if(position == 1024*divider) position = 0;
|
if(position == 1024 * divider) position = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
State horizontal_state_, vertical_state_;
|
State horizontal_state_, vertical_state_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user