diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-28 13:22:33 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-28 13:22:33 +0200 |
commit | dbd005573295293d35647dc0e9feb2beec48a31c (patch) | |
tree | 80ee9ad9f71f97bf02399fcd77ed9a7cef3f3266 | |
parent | 1ee27617253350485fc95be928cefdd5baf7ab9a (diff) |
socat pty tip
-rw-r--r-- | robot/- | 0 | ||||
-rw-r--r-- | robot/readme.md | 9 | ||||
-rw-r--r-- | robot/sim.h | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/robot/- b/robot/- deleted file mode 100644 index e69de29..0000000 --- a/robot/- +++ /dev/null diff --git a/robot/readme.md b/robot/readme.md index e6ab294..8995dfb 100644 --- a/robot/readme.md +++ b/robot/readme.md @@ -22,7 +22,14 @@ SIM = true`, the robot code can be compiled for desktop debugging instead. all used pololu functions must be manually implemented in sim.c for this to work, but it allows easier debugging. *it's important that the `orangutan_shim.h` header is used instead of including `<pololu/orangutan.h>` directly for this to -keep working!* +keep working!* if you want to use the simulation robot code with the client, +compile the sim like normal, and use `socat` to create a pseudo-tty and foward +stdio. this pseudo-tty can be used as the com port argument for the client. +here's an example command that creates a tty device in this folder: + +``` +./a.out headless | socat pty,raw,echo=0,link=tty - +``` ## module hierarchy diff --git a/robot/sim.h b/robot/sim.h index 249414d..23b47f1 100644 --- a/robot/sim.h +++ b/robot/sim.h @@ -18,7 +18,7 @@ extern bool g_w2_sim_headless; #define DBG_ENABLE_CYCLEINFO (0) #define DBG_ENABLE_SERIAL (1) -#define DBG_MAX_CYCLES (10) +#define DBG_MAX_CYCLES (-1) // debug print options #define DBG_BYTES_PER_LINE 16 |