From 1e48d086f51a5b96e14fa010703b7b4341030243 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Mon, 28 Aug 2017 13:15:47 -0700 Subject: [PATCH] switch panda to use not gmlan for started detection --- VERSION | 2 +- board/main.c | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/VERSION b/VERSION index ba44a52e53f57f..def571d5e19174 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.9.4 \ No newline at end of file +v0.9.5 \ No newline at end of file diff --git a/board/main.c b/board/main.c index 32e4ab4c9089a5..1c072b007586a8 100644 --- a/board/main.c +++ b/board/main.c @@ -79,30 +79,22 @@ int get_health_pkt(void *dat) { uint8_t started_signal_detected; uint8_t started_alt; } *health = dat; - #ifdef PANDA - int started_signal = (GPIOB->IDR & (1 << 12)) == 0; - #else - int started_signal = (GPIOC->IDR & (1 << 13)) != 0; - #endif health->voltage = adc_get(ADCCHAN_VOLTAGE); + #ifdef PANDA health->current = adc_get(ADCCHAN_CURRENT); + health->started = (GPIOA->IDR & (1 << 1)) == 0; #else health->current = 0; -#endif - health->started = started_signal; - -#ifdef PANDA - health->started_alt = (GPIOA->IDR & (1 << 1)) == 0; -#else - health->started_alt = 0; + health->started = (GPIOC->IDR & (1 << 13)) != 0; #endif health->controls_allowed = controls_allowed; health->gas_interceptor_detected = gas_interceptor_detected; // DEPRECATED + health->started_alt = 0; health->started_signal_detected = 0; return sizeof(*health);