diff options
| author | lonkaars <loek@pipeframe.xyz> | 2022-05-09 17:17:53 +0200 | 
|---|---|---|
| committer | lonkaars <loek@pipeframe.xyz> | 2022-05-09 17:17:53 +0200 | 
| commit | 32237bc52d1dd69d60dda75ddc29bb31ce165c83 (patch) | |
| tree | aff899e8b09f7a1b66e06eb4769548ca12169557 /robot/hypervisor.c | |
| parent | be84308e01ecc9e8de2997ab030420b401e06596 (diff) | |
implement setup and hypervisor
Diffstat (limited to 'robot/hypervisor.c')
| -rw-r--r-- | robot/hypervisor.c | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/robot/hypervisor.c b/robot/hypervisor.c index db0700d..381d9af 100644 --- a/robot/hypervisor.c +++ b/robot/hypervisor.c @@ -1,5 +1,8 @@ -#include "hypervisor.h" +#include <pololu/orangutan.h> + +#include "consts.h"  #include "errcatch.h" +#include "hypervisor.h"  #include "io.h"  #include "modes.h"  #include "sercomm.h" @@ -9,8 +12,8 @@ void w2_hypervisor_main() {  	w2_errcatch_main();  	w2_io_main(); -	// start timer +	time_reset();  	w2_modes_main(); -	// stop timer -	// throw error if cycle expired +	unsigned long elapsed_ms = get_ms(); +	if (elapsed_ms > W2_MAX_MODULE_CYCLE_MS) w2_errcatch_throw(W2_ERR_CYCLE_EXPIRED);  } |