Skip to content

Commit 59398df

Browse files
committed
fix: 🚨 fix type of prev_time
1 parent 8cb9027 commit 59398df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/devices/screen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ void Screen::on_touched(
4040
// TODO: Determine thread safety? (What happens if task A calls this, and while touch_task is
4141
// being constructed, task B preempts it and calls this again?)
4242
static pros::Task touch_task([] {
43-
while (true) {
44-
const auto touch = Screen::get_last_touch();
43+
while (true) {
44+
const auto touch = Screen::get_last_touch();
4545
const auto state = touch.state;
46-
static Screen::TouchEvent::State prev_state = state;
47-
static size_t prev_time = pros::millis();
46+
static Screen::TouchEvent::State prev_state = state;
47+
static uint32_t prev_time = pros::millis();
4848

4949
if (prev_state != state)
5050
for (const auto& listener : listeners)

0 commit comments

Comments
 (0)