You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
587 B
C
30 lines
587 B
C
#include "controller.h"
|
|
|
|
int *splits = 0;
|
|
|
|
void ctrl_pause(GHTimer *timer) {
|
|
if (timer->paused) {
|
|
ghtimer_resume(timer);
|
|
} else {
|
|
ghtimer_pause(timer);
|
|
}
|
|
}
|
|
|
|
void ctrl_start(GHTimer *timer) {
|
|
if (timer->running) {
|
|
if (splits != NULL) {
|
|
//splits_next();
|
|
} else {
|
|
ghtimer_stop(timer); //stop or reset, save splits
|
|
}
|
|
|
|
//pause timer if last split
|
|
if (splits == NULL) {
|
|
ghtimer_pause(timer);
|
|
return;
|
|
}
|
|
} else {
|
|
ghtimer_start(timer);
|
|
}
|
|
}
|