UPD: more universal codebase for different vehicles

This commit is contained in:
Niklas Fauth
2018-04-09 21:43:59 +02:00
parent 69a14c52a9
commit de8957536c
6 changed files with 1211 additions and 1455 deletions

View File

@@ -5,7 +5,6 @@
#include "config.h"
TIM_HandleTypeDef TimHandle;
uint16_t ppm_captured_value[PPM_NUM_CHANNELS+1] = {0};
uint8_t ppm_count = 0;
uint32_t timeout = 100;
uint8_t nunchuck_data[6] = {0};
@@ -16,6 +15,9 @@ extern I2C_HandleTypeDef hi2c2;
DMA_HandleTypeDef hdma_i2c2_rx;
DMA_HandleTypeDef hdma_i2c2_tx;
#ifdef CONTROL_PPM
uint16_t ppm_captured_value[PPM_NUM_CHANNELS+1] = {0};
void PPM_ISR_Callback() {
// Dummy loop with 16 bit count wrap around
uint16_t rc_delay = TIM2->CNT;
@@ -54,7 +56,7 @@ void PPM_Init() {
HAL_NVIC_EnableIRQ(EXTI3_IRQn);
HAL_TIM_Base_Start(&TimHandle);
}
#endif
void Nunchuck_Init() {
//-- START -- init WiiNunchuck