Skip to content

Commit

Permalink
almost there, now editing car/tesla
Browse files Browse the repository at this point in the history
  • Loading branch information
Comma Device committed Mar 25, 2020
1 parent 1a7319a commit 3a9cd0c
Show file tree
Hide file tree
Showing 95 changed files with 384,148 additions and 48 deletions.
18 changes: 12 additions & 6 deletions cereal/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,32 @@ messaging_dir = Dir('messaging')
# TODO: remove src-prefix and cereal from command string. can we set working directory?
env.Command(["gen/c/include/c++.capnp.h", "gen/c/include/java.capnp.h"], [], "mkdir -p " + gen_dir.path + "/c/include && touch $TARGETS")
env.Command(
['gen/c/car.capnp.c', 'gen/c/log.capnp.c', 'gen/c/car.capnp.h', 'gen/c/log.capnp.h'],
['car.capnp', 'log.capnp'],
['gen/c/car.capnp.c', 'gen/c/log.capnp.c', 'gen/c/ui.capnp.c', 'gen/c/tinkla.capnp.c', 'gen/c/tesla.capnp.c', 'gen/c/car.capnp.h', 'gen/c/log.capnp.h', 'gen/c/ui.capnp.h', 'gen/c/tinkla.capnp.h', 'gen/c/tesla.capnp.h'],
['car.capnp', 'log.capnp', 'tesla.capnp', 'tinkla.capnp', 'ui.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c:' + gen_dir.path + '/c/')
env.Command(
['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++', 'gen/cpp/car.capnp.h', 'gen/cpp/log.capnp.h'],
['car.capnp', 'log.capnp'],
['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++', 'gen/cpp/ui.capnp.c++', 'gen/cpp/tinkla.capnp.c++', 'gen/cpp/tesla.capnp.c++', 'gen/cpp/car.capnp.h', 'gen/cpp/log.capnp.h', 'gen/cpp/ui.capnp.h', 'gen/cpp/tinkla.capnp.h', 'gen/cpp/tesla.capnp.h'],
['car.capnp', 'log.capnp', 'tesla.capnp', 'tinkla.capnp', 'ui.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c++:' + gen_dir.path + '/cpp/')
import shutil
if shutil.which('capnpc-java'):
env.Command(
['gen/java/Car.java', 'gen/java/Log.java'],
['car.capnp', 'log.capnp'],
['gen/java/Car.java', 'gen/java/Log.java', 'gen/java/Tesla.java', 'gen/java/Tinkla.java', 'gen/java/Ui.java'],
['car.capnp', 'log.capnp', 'tesla.capnp','tinkla.capnp', 'ui.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o java:' + gen_dir.path + '/java/')

# TODO: remove non shared cereal and messaging
cereal_objects = env.SharedObject([
'gen/c/car.capnp.c',
'gen/c/log.capnp.c',
'gen/c/tesla.capnp.c',
'gen/c/ui.capnp.c',
'gen/c/tinkla.capnp.c',
'gen/cpp/car.capnp.c++',
'gen/cpp/log.capnp.c++',
'gen/cpp/tesla.capnp.c++',
'gen/cpp/ui.capnp.c++',
'gen/cpp/tinkla.capnp.c++',
])

env.Library('cereal', cereal_objects)
Expand Down
2 changes: 1 addition & 1 deletion cereal/tesla.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $Java.outerClassname("Alca");

@0xca61a35dedbd6327;

const interfaceVersion :Float32 = 4.0;
#const interfaceVersion :Float32 = 4.0;

struct ALCAStatus {
# ALCA info
Expand Down
8 changes: 3 additions & 5 deletions launch_chffrplus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ function launch {
# switching branches/forks, which should not be overwritten.
# 2. The FINALIZED consistent file has to exist, indicating there's an update
# that completed successfully and synced to disk.


if [ -f "${BASEDIR}/.overlay_init" ]; then

if [ $do_auto_update == "True" ] && [ -f "${BASEDIR}/.overlay_init" ]; then
find ${BASEDIR}/.git -newer ${BASEDIR}/.overlay_init | grep -q '.' 2> /dev/null
if [ $? -eq 0 ]; then
echo "${BASEDIR} has been modified, skipping overlay update installation"
Expand All @@ -70,10 +72,6 @@ function launch {
fi
fi

exec "${BASH_SOURCE[0]}"
fi
fi

# no cpu rationing for now
echo 0-3 > /dev/cpuset/background/cpus
echo 0-3 > /dev/cpuset/system-background/cpus
Expand Down
Empty file.
Binary file added panda.old/board/obj/bootstub.panda.bin
Binary file not shown.
Binary file added panda.old/board/obj/bootstub.panda.elf
Binary file not shown.
12 changes: 12 additions & 0 deletions panda.old/board/obj/cert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
RSAPublicKey debug_rsa_key = {.len = 0x20,
.n0inv = 424155863U,
.n = {2967635737U,1729484964U,2923910269U,896973705U,2756634505U,1709807447U,859352051U,1472485542U,3894793311U,1758995271U,1038644067U,3403716708U,1897604023U,3841462137U,3816219379U,440074165U,3729800853U,260624241U,1851885412U,4004943886U,1292603008U,3542917226U,911436055U,646960542U,732923244U,2088531324U,2245117918U,3785523979U,457179915U,2220748175U,1183724003U,3185822055U},
.rr = {3273109191U,3469007740U,3022601451U,1950134277U,985405731U,4135629386U,2455447451U,3280986897U,2398786518U,3282545666U,234074194U,9520868U,2034083245U,2050827209U,3952400957U,2761293147U,3022794169U,571779422U,596386776U,1456095933U,1696349762U,1186603127U,877771148U,25300791U,1259288593U,3469483597U,490515539U,1207523392U,1069952767U,3645632153U,103445962U,1631238578U},
.exponent = 65537,
};
RSAPublicKey release_rsa_key = {.len = 0x20,
.n0inv = 1360707903U,
.n = {3136311617U,2320862383U,803666948U,3430646816U,580574987U,3438755054U,368561231U,2514628750U,1163918779U,1402283812U,3703279536U,3640319338U,2481729960U,1799009981U,3965904331U,1775854474U,2163541227U,3964480191U,4232838337U,1772169236U,2591977211U,2175464477U,855648893U,1705081629U,387118095U,531497093U,2116518570U,858910171U,1495505556U,1118497527U,3665009874U,3325546900U},
.rr = {833089023U,2334198892U,2951037656U,3097613940U,1480625656U,2314042190U,767760477U,1330548127U,1851070335U,2943928230U,390126945U,3239825982U,1706845884U,2555293437U,2227978300U,1210679880U,955381365U,1938575352U,3072247641U,9917391U,3743118591U,1096013164U,1945423205U,1015551925U,788452122U,513488935U,145751748U,3046730117U,1184780246U,1616719441U,1144453735U,1858195855U},
.exponent = 65537,
};
Binary file added panda.old/board/obj/code.bin
Binary file not shown.
1 change: 1 addition & 0 deletions panda.old/board/obj/gitversion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const uint8_t gitversion[] = "v1.5.9-EON-unknown-DEBUG";
Binary file added panda.old/board/obj/panda.bin
Binary file not shown.
Binary file added panda.old/board/obj/panda.elf
Binary file not shown.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion panda/board/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void set_safety_mode2(uint16_t mode, int16_t param) {
can_silent = ALL_CAN_LIVE;
break;
}
rev_safety_mode = mode;
prev_safety_mode = mode;
can_init_all();
}

Expand Down
Loading

0 comments on commit 3a9cd0c

Please sign in to comment.