From e893a6d068b5a7a7098451300009a95ca6aa0581 Mon Sep 17 00:00:00 2001 From: Tonton Th Date: Wed, 27 May 2026 06:45:41 +0200 Subject: [PATCH] first boilerplate --- .gitignore | 36 ++---------------------------------- Code/Lien.md | 4 ++++ Code/Makefile | 20 ++++++++++++++++++++ Code/README.md | 0 Code/mcp.c | 23 +++++++++++++++++++++++ Code/protocol.c | 29 +++++++++++++++++++++++++++++ Code/protocol.h | 8 ++++++++ Docs/README.md | 0 Docs/Vision.md | 9 +++++++++ README.md | 6 +++++- WS/README.md | 1 + 11 files changed, 101 insertions(+), 35 deletions(-) create mode 100644 Code/Lien.md create mode 100644 Code/Makefile create mode 100644 Code/README.md create mode 100644 Code/mcp.c create mode 100644 Code/protocol.c create mode 100644 Code/protocol.h create mode 100644 Docs/README.md create mode 100644 Docs/Vision.md create mode 100644 WS/README.md diff --git a/.gitignore b/.gitignore index cd531cf..32f3744 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# ---> C -# Prerequisites -*.d # Object files *.o @@ -13,42 +10,13 @@ *.map *.exp -# Precompiled Headers -*.gch -*.pch - # Libraries *.lib *.a *.la *.lo -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib +# Myrys Rover project +Code/mcp -# 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 diff --git a/Code/Lien.md b/Code/Lien.md new file mode 100644 index 0000000..a6fe71e --- /dev/null +++ b/Code/Lien.md @@ -0,0 +1,4 @@ +# Le lien avec le Rover + +Bonne question ! + diff --git a/Code/Makefile b/Code/Makefile new file mode 100644 index 0000000..8071708 --- /dev/null +++ b/Code/Makefile @@ -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 $@ + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Code/README.md b/Code/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Code/mcp.c b/Code/mcp.c new file mode 100644 index 0000000..002eeb2 --- /dev/null +++ b/Code/mcp.c @@ -0,0 +1,23 @@ +/* + * MYRYS ROVER + * MASTER CONTROL PROGRAM + */ + +#include +#include +#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; +} +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Code/protocol.c b/Code/protocol.c new file mode 100644 index 0000000..4dd3a7c --- /dev/null +++ b/Code/protocol.c @@ -0,0 +1,29 @@ +/* + * MYRYS ROVER + * Low level communication protocol + * + * new Wed May 27 03:58.27 AM UTC 2026 + */ + +#include +#include +#include + +#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; +} + diff --git a/Code/protocol.h b/Code/protocol.h new file mode 100644 index 0000000..f86c54e --- /dev/null +++ b/Code/protocol.h @@ -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); diff --git a/Docs/README.md b/Docs/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Docs/Vision.md b/Docs/Vision.md new file mode 100644 index 0000000..286d1ab --- /dev/null +++ b/Docs/Vision.md @@ -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) \ No newline at end of file diff --git a/README.md b/README.md index 474d15f..59db62a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # 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. \ No newline at end of file +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. \ No newline at end of file diff --git a/WS/README.md b/WS/README.md new file mode 100644 index 0000000..7c4ead3 --- /dev/null +++ b/WS/README.md @@ -0,0 +1 @@ +As usual, this is the `WORKSPACE` directory.