hoverboard-firmware-hack-se.../Inc/config.h

32 lines
813 B
C
Raw Normal View History

#pragma once
#include "stm32f1xx_hal.h"
#define R 0.27
#define P 15
#define PSI 0.02
#define V 23
#define MILLI_R (R * 1000)
#define MILLI_PSI (PSI * 1000)
#define MILLI_V (V * 1000)
2018-02-09 08:39:47 +00:00
#define PWM_FREQ 16000 // PWM frequency in Hz
#define DEAD_TIME 32 // PWM deadtime
2018-02-18 12:37:50 +00:00
//#define DC_CUR_LIMIT 34 // Motor DC current limit in amps
2018-04-07 22:03:35 +00:00
#define DC_CUR_LIMIT 35 // Motor DC current limit in amps
//#define DEBUG_SERIAL_SERVOTERM
2018-04-07 22:03:35 +00:00
#define DEBUG_SERIAL_ASCII
#define DEBUG_SERIAL_USART2
2018-02-09 08:39:47 +00:00
#define DEBUG_BAUD 115200 // UART baud rate
//#define DEBUG_I2C_LCD
2018-02-09 08:39:47 +00:00
2018-04-07 22:03:35 +00:00
//#define CONTROL_PPM // use PPM CONTROL_PPM
2018-02-09 08:39:47 +00:00
#define PPM_NUM_CHANNELS 6 // number of PPM channels to receive
2018-04-07 22:03:35 +00:00
// #define CONTROL_ADC
#define CONTROL_NUNCHUCK
// #define BEEPS_BACKWARD