-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
1282e8f cap libusb1 version in setup (#183) 64bcc89 Subaru: 545 msg must be generated 9159df9 Merge branch '0.5.10-chyrsler' f8ab74a L-line relay (#166) 11c4cdc Cleanup leftover jenkins command 22572d9 Fix Jenkins build dockerfiles with same name 1d2f8f0 Jenkins (#179) f383eee Power saving: wake on RX and don't print durint IRQ 9540db7 Chrysler safety: better to mention messages we don't want to forward 1049502 chrysler: forward bus 0 to bus 2 (#177) 4276c38 Additional Power saving (#170) git-subtree-dir: panda git-subtree-split: 1282e8f
- Loading branch information
Vehicle Researcher
committed
Apr 23, 2019
1 parent
27ef9f2
commit 3c25760
Showing
37 changed files
with
947 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.git | ||
.DS_Store | ||
boardesp/esp-open-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
FROM ubuntu:16.04 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
autoconf \ | ||
automake \ | ||
bash \ | ||
bison \ | ||
bzip2 \ | ||
curl \ | ||
dfu-util \ | ||
flex \ | ||
g++ \ | ||
gawk \ | ||
gcc \ | ||
git \ | ||
gperf \ | ||
help2man \ | ||
iputils-ping \ | ||
libexpat-dev \ | ||
libstdc++-arm-none-eabi-newlib \ | ||
libtool \ | ||
libtool-bin \ | ||
libusb-1.0-0 \ | ||
make \ | ||
ncurses-dev \ | ||
network-manager \ | ||
python-dev \ | ||
python-serial \ | ||
sed \ | ||
texinfo \ | ||
unrar-free \ | ||
unzip \ | ||
wget \ | ||
build-essential \ | ||
python-dev \ | ||
python-pip \ | ||
screen \ | ||
vim \ | ||
wget \ | ||
wireless-tools | ||
|
||
RUN pip install --upgrade pip==18.0 | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN pip install -r /tmp/requirements.txt | ||
|
||
RUN mkdir -p /home/batman | ||
ENV HOME /home/batman | ||
|
||
ENV PYTHONPATH /tmp:$PYTHONPATH | ||
|
||
COPY ./boardesp/get_sdk_ci.sh /tmp/panda/boardesp/ | ||
|
||
RUN useradd --system -s /sbin/nologin pandauser | ||
RUN mkdir -p /tmp/panda/boardesp/esp-open-sdk | ||
RUN chown pandauser /tmp/panda/boardesp/esp-open-sdk | ||
USER pandauser | ||
RUN cd /tmp/panda/boardesp && ./get_sdk_ci.sh | ||
USER root | ||
|
||
COPY ./xx/pandaextra /tmp/pandaextra | ||
|
||
ADD ./panda.tar.gz /tmp/panda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
pipeline { | ||
agent any | ||
environment { | ||
AUTHOR = """${sh( | ||
returnStdout: true, | ||
script: "git --no-pager show -s --format='%an' ${GIT_COMMIT}" | ||
).trim()}""" | ||
|
||
DOCKER_IMAGE_TAG = "panda:build-${env.BUILD_ID}" | ||
DOCKER_NAME = "panda-test-${env.BUILD_ID}" | ||
} | ||
stages { | ||
stage('Build Docker Image') { | ||
steps { | ||
timeout(time: 60, unit: 'MINUTES') { | ||
script { | ||
sh 'git clone --no-checkout --depth 1 git@github.com:commaai/xx.git || true' | ||
sh 'cd xx && git fetch origin && git checkout origin/master -- pandaextra && cd ..' // Needed for certs for panda flashing | ||
sh 'git archive -v -o panda.tar.gz --format=tar.gz HEAD' | ||
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}") | ||
} | ||
} | ||
} | ||
} | ||
stage('Test Dev Build') { | ||
steps { | ||
lock(resource: "Pandas", inversePrecedence: true, quantity:1){ | ||
timeout(time: 60, unit: 'MINUTES') { | ||
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh '" | ||
} | ||
} | ||
} | ||
} | ||
stage('Test EON Build') { | ||
steps { | ||
lock(resource: "Pandas", inversePrecedence: true, quantity:1){ | ||
timeout(time: 60, unit: 'MINUTES') { | ||
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml" | ||
sh "touch EON && docker cp EON ${env.DOCKER_NAME}:/EON" | ||
sh "docker start -a ${env.DOCKER_NAME}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
script { | ||
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_EON.xml" | ||
sh "docker rm ${env.DOCKER_NAME}" | ||
} | ||
junit "test_results*.xml" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.2.0 | ||
v1.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#ifdef PANDA | ||
|
||
int relay_control = 0; // True if relay is controlled through l-line | ||
|
||
/* Conrol a relay connected to l-line pin */ | ||
|
||
// 160us cycles, 1 high, 25 low | ||
|
||
volatile int turn_on_relay = 0; | ||
volatile int on_cycles = 25; | ||
|
||
//5s timeout | ||
#define LLINE_TIMEOUT_CYCLES 31250 | ||
volatile int timeout_cycles = LLINE_TIMEOUT_CYCLES; | ||
|
||
void TIM5_IRQHandler(void) { | ||
if (TIM5->SR & TIM_SR_UIF) { | ||
on_cycles--; | ||
timeout_cycles--; | ||
if (timeout_cycles == 0) { | ||
turn_on_relay = 0; | ||
} | ||
if (on_cycles > 0) { | ||
if (turn_on_relay) { | ||
set_gpio_output(GPIOC, 10, 0); | ||
} | ||
} | ||
else { | ||
set_gpio_output(GPIOC, 10, 1); | ||
on_cycles = 25; | ||
} | ||
} | ||
TIM5->ARR = 160-1; | ||
TIM5->SR = 0; | ||
} | ||
|
||
void lline_relay_init (void) { | ||
set_lline_output(0); | ||
relay_control = 1; | ||
set_gpio_output(GPIOC, 10, 1); | ||
|
||
// setup | ||
TIM5->PSC = 48-1; // tick on 1 us | ||
TIM5->CR1 = TIM_CR1_CEN; // enable | ||
TIM5->ARR = 50-1; // 50 us | ||
TIM5->DIER = TIM_DIER_UIE; // update interrupt | ||
TIM5->CNT = 0; | ||
|
||
NVIC_EnableIRQ(TIM5_IRQn); | ||
|
||
#ifdef DEBUG | ||
puts("INIT LLINE\n"); | ||
puts(" SR "); | ||
putui(TIM5->SR); | ||
puts(" PSC "); | ||
putui(TIM5->PSC); | ||
puts(" CR1 "); | ||
putui(TIM5->CR1); | ||
puts(" ARR "); | ||
putui(TIM5->ARR); | ||
puts(" DIER "); | ||
putui(TIM5->DIER); | ||
puts(" SR "); | ||
putui(TIM5->SR); | ||
puts(" CNT "); | ||
putui(TIM5->CNT); | ||
puts("\n"); | ||
#endif | ||
} | ||
|
||
void lline_relay_release (void) { | ||
set_lline_output(0); | ||
relay_control = 0; | ||
puts("RELEASE LLINE\n"); | ||
set_gpio_alternate(GPIOC, 10, GPIO_AF7_USART3); | ||
NVIC_DisableIRQ(TIM5_IRQn); | ||
} | ||
|
||
void set_lline_output(int to_set) { | ||
timeout_cycles = LLINE_TIMEOUT_CYCLES; | ||
turn_on_relay = to_set; | ||
} | ||
|
||
int get_lline_status() { | ||
return turn_on_relay; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.