add sockets

This commit is contained in:
2024-12-24 23:15:44 +01:00
parent 494b835d11
commit bdaf894aea
17 changed files with 354 additions and 7 deletions
@@ -3,13 +3,13 @@
char *action_name[8] = {"LEFT", "CENTER", "RIGHT"};
float reLU(float x){
if(x>10) return 10;
// if(x>10) return 10;
if(x>0) return x;
return 0;
}
float d_reLU(float x){
if (x>10) return 0;
// if (x>10) return 0;
if (x>0) return 1;
return 0;
}
+1 -1
View File
@@ -418,7 +418,7 @@ float distance2_coordinate(coordinate *c0, coordinate *c1){
diStep_sensor->x[0] += step_sensor * cos(direction_radian);\
diStep_sensor->x[1] -= step_sensor * sin(direction_radian);\
}\
dist = (distance2_coordinate(diStep_sensor, v->coord)/5);\
dist = (distance2_coordinate(diStep_sensor, v->coord)/10/*5*/);\
/*printf("| dist :%f | ",dist);*/\
v->sensor->x[position] = (float)(MIN((SUBDIVISION-1),dist))/SUBDIVISION ;\