first boilerplate

This commit is contained in:
Tonton Th
2026-05-27 06:45:41 +02:00
parent 57242eaec0
commit e893a6d068
11 changed files with 101 additions and 35 deletions

36
.gitignore vendored
View File

@@ -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

4
Code/Lien.md Normal file
View File

@@ -0,0 +1,4 @@
# Le lien avec le Rover
Bonne question !

20
Code/Makefile Normal file
View 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
View File

23
Code/mcp.c Normal file
View 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
View 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
View 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
View File

9
Docs/Vision.md Normal file
View 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)

View File

@@ -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.
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
View File

@@ -0,0 +1 @@
As usual, this is the `WORKSPACE` directory.