unsigned getSensor(unsigned sensorId);
void writeResults();
-#define DEBUG 0
-#define MAX_SENSORS 12
+#define DEBUG 3
+#define MAX_SENSORS 8
+unsigned framesize[MAX_SENSORS][5] = {{0}};
unsigned pixelMap[MAX_SENSORS][576][1152] = {{0}};
unsigned pixelcount[MAX_SENSORS][1153] = {{0}};
unsigned statistics[MAX_SENSORS][4] = {{0}};
return i;
}
}
- if (numSensors == MAX_SENSORS) { return -1;}
+ if (numSensors == MAX_SENSORS) { printf("More sensors than I can handle. Dieing...\n"); return -1;}
sensors[numSensors] = sensorId;
return numSensors++;
unsigned hnum;
unsigned data;
unsigned pdata = 0x0;
-
+
format = sub->Data(pos+1);
#if DEBUG>=1
printf("form\t%08x\n",format);
printf("Sensor\t%02x\tID\t%08x\tStatus\t%08x\tError\t%08x\tDebug\t%08x\n",
mySensor, frame_id, frame_status, frame_errcode, frame_debug);
#endif
-
+ framesize[mySensor][numSubevents%5] += datalen;
if (sub->Data(pdata) != 0x55555555) {
#if DEBUG>=1
printf("ERROR: Sensor Header (0x55555555) Not Found! (got: %08x)\n",sub->Data(pdata));
unsigned sensorIsValid = 0;
if (v1 == 1){
- if((frame_status & 0xf000000f) == 0xf000000f) {
+ if((frame_status & 0xf000000f) == 0xf000000f or (frame_status & 0xf000000f) == 0xf0000007) {
sensorIsValid = 1;
}
else{
sensorIsValid = 0;
+ //printf("Frame Status 0x%08x\n",frame_status);
statistics[mySensor][FRBROKEN]++;
}
}
hitrates[2],
hitrates[3]
);
+
+ printf("\t\t\t\t\t\t\t%i\t%i\t%i\t%i\t%i\n",framesize[i][0],framesize[i][1],framesize[i][2],framesize[i][3],framesize[i][4]);
FILE* cvt;
int status;