Skip to content

Commit

Permalink
Merge from comma upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamezz committed Apr 11, 2018
2 parents a0cc51a + ea1c1dc commit 23d3833
Show file tree
Hide file tree
Showing 41 changed files with 1,706 additions and 269 deletions.
41 changes: 41 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2
jobs:
safety:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build image
command: "docker build -t panda_safety -f tests/safety/Dockerfile ."
- run:
name: Run safety test
command: |
docker run panda_safety /bin/bash -c "cd /panda/tests/safety; ./test.sh"
build:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build image
command: "docker build -t panda_build -f tests/build/Dockerfile ."
- run:
name: Test python package installer
command: |
docker run panda_build /bin/bash -c "cd /panda; python setup.py install"
- run:
name: Build STM image
command: |
docker run panda_build /bin/bash -c "cd /panda/board; make bin"
- run:
name: Build ESP image
command: |
docker run panda_build /bin/bash -c "cd /panda/boardesp; make user1.bin"
workflows:
version: 2
main:
jobs:
- safety
- build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.*.swp
.*.swo
*.o
*.so
*.d
a.out
*~
.#*
Expand Down
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It uses an [STM32F413](http://www.st.com/en/microcontrollers/stm32f413-423.html?

It is 2nd gen hardware, reusing code and parts from the [NEO](https://github.com/commaai/neo) interface board.

[![Build Status](https://travis-ci.org/commaai/panda.svg?branch=master)](https://travis-ci.org/commaai/panda)
[![CircleCI](https://circleci.com/gh/commaai/panda.svg?style=svg)](https://circleci.com/gh/commaai/panda)

Usage
------
Expand All @@ -35,7 +35,7 @@ And to send one on bus 0:
```
>>> panda.can_send(0x1aa, "message", 0)
```
More examples coming soon
Find user made scripts on the [wiki](https://community.comma.ai/wiki/index.php/Panda_scripts)

Software interface support
------
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.8
v1.1.1
6 changes: 6 additions & 0 deletions board/bootstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
#include "drivers/usb.h"
//#include "drivers/uart.h"

#ifdef PEDAL
#define CUSTOM_CAN_INTERRUPTS
#include "safety.h"
#include "drivers/can.h"
#endif

int puts(const char *a) { return 0; }
void puth(unsigned int i) {}

Expand Down
2 changes: 1 addition & 1 deletion board/build.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS += -I inc -I ../ -nostdlib -fno-builtin -std=gnu11 -O2
CFLAGS += -I inc -I ../ -nostdlib -fno-builtin -std=gnu11 -O0
CFLAGS += -Tstm32_flash.ld

CC = arm-none-eabi-gcc
Expand Down
5 changes: 3 additions & 2 deletions board/drivers/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,14 @@ void can_rx(uint8_t can_number) {

// forwarding (panda only)
#ifdef PANDA
if (can_forwarding[bus_number] != -1) {
int bus_fwd_num = can_forwarding[bus_number] != -1 ? can_forwarding[bus_number] : safety_fwd_hook(bus_number, &to_push);
if (bus_fwd_num != -1) {
CAN_FIFOMailBox_TypeDef to_send;
to_send.RIR = to_push.RIR | 1; // TXRQ
to_send.RDTR = to_push.RDTR;
to_send.RDLR = to_push.RDLR;
to_send.RDHR = to_push.RDHR;
can_send(&to_send, can_forwarding[bus_number]);
can_send(&to_send, bus_fwd_num);
}
#endif

Expand Down
Loading

0 comments on commit 23d3833

Please sign in to comment.