first boilerplate
This commit is contained in:
36
.gitignore
vendored
36
.gitignore
vendored
@@ -1,6 +1,3 @@
|
|||||||
# ---> C
|
|
||||||
# Prerequisites
|
|
||||||
*.d
|
|
||||||
|
|
||||||
# Object files
|
# Object files
|
||||||
*.o
|
*.o
|
||||||
@@ -13,42 +10,13 @@
|
|||||||
*.map
|
*.map
|
||||||
*.exp
|
*.exp
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
*.lib
|
*.lib
|
||||||
*.a
|
*.a
|
||||||
*.la
|
*.la
|
||||||
*.lo
|
*.lo
|
||||||
|
|
||||||
# Shared objects (inc. Windows DLLs)
|
# Myrys Rover project
|
||||||
*.dll
|
Code/mcp
|
||||||
*.so
|
|
||||||
*.so.*
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
*.i*86
|
|
||||||
*.x86_64
|
|
||||||
*.hex
|
|
||||||
|
|
||||||
# Debug files
|
|
||||||
*.dSYM/
|
|
||||||
*.su
|
|
||||||
*.idb
|
|
||||||
*.pdb
|
|
||||||
|
|
||||||
# Kernel Module Compile Results
|
|
||||||
*.mod*
|
|
||||||
*.cmd
|
|
||||||
.tmp_versions/
|
|
||||||
modules.order
|
|
||||||
Module.symvers
|
|
||||||
Mkfile.old
|
|
||||||
dkms.conf
|
|
||||||
|
|
||||||
|
|||||||
4
Code/Lien.md
Normal file
4
Code/Lien.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Le lien avec le Rover
|
||||||
|
|
||||||
|
Bonne question !
|
||||||
|
|
||||||
20
Code/Makefile
Normal file
20
Code/Makefile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# MYRYS ROVER BUILD CONTROLER
|
||||||
|
#
|
||||||
|
|
||||||
|
COPT = -g -Wall -DDEBUG_LEVEL=0
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
protocol.o: protocol.c protocol.h Makefile
|
||||||
|
gcc -c $(COPT) $< -o $@
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
mcp: mcp.c protocol.o Makefile
|
||||||
|
gcc $(COPT) $< protocol.o -o $@
|
||||||
|
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
0
Code/README.md
Normal file
0
Code/README.md
Normal file
23
Code/mcp.c
Normal file
23
Code/mcp.c
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* MYRYS ROVER
|
||||||
|
* MASTER CONTROL PROGRAM
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "protocol.h"
|
||||||
|
|
||||||
|
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int foo;
|
||||||
|
|
||||||
|
fprintf(stderr, "******* hello from Myrys Rover MCP\n");
|
||||||
|
fprintf(stderr, "\tyour pid is %ld\n", (long)getpid());
|
||||||
|
|
||||||
|
foo = send_a_ping(0, "wtf bro ?", 42);
|
||||||
|
fprintf(stderr, "\tpong return value is $%06x\n", foo);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||||
29
Code/protocol.c
Normal file
29
Code/protocol.c
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* MYRYS ROVER
|
||||||
|
* Low level communication protocol
|
||||||
|
*
|
||||||
|
* new Wed May 27 03:58.27 AM UTC 2026
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "protocol.h"
|
||||||
|
|
||||||
|
|
||||||
|
int send_a_ping(int code, char *texte, int k)
|
||||||
|
{
|
||||||
|
unsigned int foo, bar;
|
||||||
|
|
||||||
|
fprintf(stderr, "\tpid %ld is sending \"%s\"\n", (long)getpid(), texte);
|
||||||
|
foo = 3 + (rand() % 8);
|
||||||
|
#if DEBUG_LEVEL
|
||||||
|
fprintf(stderr, "+++ in %s, foo is %u\n", __func__, foo);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bar = sleep(foo);
|
||||||
|
|
||||||
|
return bar;
|
||||||
|
}
|
||||||
|
|
||||||
8
Code/protocol.h
Normal file
8
Code/protocol.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* MYRYS ROVER
|
||||||
|
* Low level communication protocol
|
||||||
|
*
|
||||||
|
* new Wed May 27 03:51.45 AM UTC 2026
|
||||||
|
*/
|
||||||
|
|
||||||
|
int send_a_ping(int, char *, int);
|
||||||
0
Docs/README.md
Normal file
0
Docs/README.md
Normal file
9
Docs/Vision.md
Normal file
9
Docs/Vision.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Vision
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
- caméra de playstation, ya pas mieux *:-)*
|
||||||
|
|
||||||
|
## Software
|
||||||
|
|
||||||
|
- on reprend du code de [FloatImg](https://git.tetalab.org/tTh/FloatImg)
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
# MyrysRover
|
# MyrysRover
|
||||||
|
|
||||||
Nous cherchons à fabriquer un petit robot autonome avec vision qui serait connecté à son MCP par un lien réseau simulant la latence, le débit et le taux d'erreur des rovers martiens.
|
Nous cherchons à fabriquer un petit robot autonome avec
|
||||||
|
[vision](Docs/Vision.md) qui
|
||||||
|
serait connecté à son [MCP](Code/mcp.c) par un
|
||||||
|
[lien réseau](Code/Lien.md) simulant
|
||||||
|
la latence, le débit et le taux d'erreur des rovers martiens.
|
||||||
1
WS/README.md
Normal file
1
WS/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
As usual, this is the `WORKSPACE` directory.
|
||||||
Reference in New Issue
Block a user