mirror of
https://github.com/lucysrausch/hoverboard-firmware-hack.git
synced 2025-08-05 02:24:27 +02:00
ADD: make unlock and make flash to Makefile
This commit is contained in:
15
Inc/config.h
15
Inc/config.h
@@ -15,7 +15,7 @@
|
||||
#define PWM_FREQ 16000 // PWM frequency in Hz
|
||||
#define DEAD_TIME 32 // PWM deadtime
|
||||
|
||||
#define DC_CUR_LIMIT 35 // Motor DC current limit in amps
|
||||
#define DC_CUR_LIMIT 25 // Motor DC current limit in amps
|
||||
|
||||
#define BAT_LOW_LVL1 36.0 // gently beeps at this voltage level
|
||||
#define BAT_LOW_LVL2 33.0 // your battery is almost empty. Charge now!
|
||||
@@ -54,6 +54,19 @@
|
||||
// #define SPEED_COEFFICIENT -1
|
||||
// #define STEER_COEFFICIENT 0
|
||||
|
||||
// #define ADDITIONAL_CODE \
|
||||
if (button1 && speedR < 300) { \
|
||||
speedR = speedR * -0.2f; \
|
||||
speedL = speedL * -0.2f; } \
|
||||
else { \
|
||||
direction = 1; } \
|
||||
if (button1 && speedR > 700) { /* field weakening at high speeds */ \
|
||||
weakl = speedR - 600; /* weak should never exceed 400 or 450 MAX!! */ \
|
||||
weakr = speedR - 600; } \
|
||||
else { \
|
||||
weakl = 0; \
|
||||
weakr = 0; }
|
||||
|
||||
// ###### ARMCHAIR ######
|
||||
// #define FILTER 0.05
|
||||
// #define SPEED_COEFFICIENT 0.5
|
||||
|
Reference in New Issue
Block a user