ADD: make unlock and make flash to Makefile

This commit is contained in:
Niklas Fauth
2018-04-25 19:27:15 +02:00
parent 4ac8b72fb0
commit 0172976057
4 changed files with 394 additions and 369 deletions

View File

@@ -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