Merge branch 'master' of github.com:r0ket/r0ket
This commit is contained in:
commit
335e14e17f
|
@ -1,3 +1,4 @@
|
|||
#include <sysdefs.h>
|
||||
#include <sysinit.h>
|
||||
#include <string.h>
|
||||
#include "basic/basic.h"
|
||||
|
@ -7,6 +8,7 @@
|
|||
#include "basic/random.h"
|
||||
|
||||
char meshgen=0; // Generation
|
||||
char meshincctr=0; // Generation
|
||||
MPKT meshbuffer[MESHBUFSIZE];
|
||||
|
||||
uint32_t const meshkey[4] = {
|
||||
|
@ -96,12 +98,15 @@ void mesh_recvloop(void){
|
|||
else
|
||||
meshgen=MO_GEN(buf);
|
||||
_timet=0;
|
||||
meshincctr=0;
|
||||
};
|
||||
|
||||
if(MO_TYPE(buf)=='T'){
|
||||
time_t toff=MO_TIME(buf)-((getTimer()+(300/SYSTICKSPEED))/(1000/SYSTICKSPEED));
|
||||
if (toff>_timet) // Do not live in the past.
|
||||
time_t toff=MO_TIME(buf)-((getTimer()+(600/SYSTICKSPEED))/(1000/SYSTICKSPEED));
|
||||
if (toff>_timet){ // Do not live in the past.
|
||||
_timet = toff;
|
||||
meshincctr++;
|
||||
};
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ typedef struct {
|
|||
#define MF_LOCK (1<<1)
|
||||
|
||||
extern char meshgen; // Generation
|
||||
extern char meshincctr; // Time checker
|
||||
extern MPKT meshbuffer[MESHBUFSIZE];
|
||||
|
||||
void initMesh(void);
|
||||
|
|
|
@ -82,7 +82,10 @@ my %defs;
|
|||
for my $idx (0..$#symb){
|
||||
$_=$symb[$idx];
|
||||
if(!$types{$_}){
|
||||
warn "Couldn't find $symb[$idx]";
|
||||
warn "Couldn't find $symb[$idx] - ignoring it.";
|
||||
print C "NULL,";
|
||||
print I "#define $_ (NULL)";
|
||||
next;
|
||||
};
|
||||
if(!$defs{$files{$_}}){
|
||||
print H qq!#include "$files{$_}"!;
|
||||
|
@ -103,3 +106,5 @@ close(I);
|
|||
close(H);
|
||||
close(C);
|
||||
|
||||
print "done.";
|
||||
|
||||
|
|
Loading…
Reference in New Issue