parent
ccd26de097
commit
e6caaf40fb
2 changed files with 0 additions and 40 deletions
@ -1,26 +0,0 @@ |
||||
#!/bin/bash |
||||
|
||||
rm -r gen/ts |
||||
rm -r gen/js |
||||
|
||||
mkdir gen/ts |
||||
mkdir gen/js |
||||
|
||||
echo "Installing needed npm modules" |
||||
npm i capnpc-ts capnp-ts |
||||
|
||||
capnpc -o node_modules/.bin/capnpc-ts:gen/ts log.capnp car.capnp |
||||
capnpc -o node_modules/.bin/capnpc-ts:gen/ts car.capnp |
||||
|
||||
cat log.capnp | egrep '\([a-zA-Z]*\.[^\s]+\.[^s]+\)' | sed 's/^.*([a-zA-Z]*\.\([a-zA-Z.]*\)).*/\1/' | while read line |
||||
do |
||||
TOKEN=`echo $line | sed 's/\./_/g'` |
||||
ROOT=`echo $line | sed 's/\..*$//g'` |
||||
cat gen/ts/log.capnp.ts | grep '^import.*'${TOKEN} |
||||
if [[ "$?" == "1" ]] |
||||
then |
||||
sed -i 's/^\(import {.*\)'${ROOT}'\(,*\) \(.*\)$/\1'${ROOT}', '${TOKEN}'\2 \3/' ./gen/ts/log.capnp.ts |
||||
fi |
||||
done |
||||
|
||||
tsc ./gen/ts/* --lib es2015 --outDir ./gen/js |
@ -1,14 +0,0 @@ |
||||
from messaging_pyx import Context, SubSocket, PubSocket |
||||
|
||||
if __name__ == "__main__": |
||||
c = Context() |
||||
pub_sock = PubSocket() |
||||
pub_sock.connect(c, "controlsState") |
||||
|
||||
for i in range(int(1e10)): |
||||
print(i) |
||||
sub_sock = SubSocket() |
||||
sub_sock.connect(c, "controlsState") |
||||
|
||||
pub_sock.send(b'a') |
||||
print(sub_sock.receive()) |
Loading…
Reference in new issue