Skip to content

Commit

Permalink
Merge pull request #138 from Mitchlol/balance_app_updates
Browse files Browse the repository at this point in the history
Balance app updates!
  • Loading branch information
vedderb authored Feb 27, 2020
2 parents 906ddb0 + 6d29b67 commit 8ae52e8
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 60 deletions.
34 changes: 32 additions & 2 deletions appconf/appconf_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,11 @@
#ifndef APPCONF_BALANCE_ROLL_FAULT
#define APPCONF_BALANCE_ROLL_FAULT 45
#endif
#ifndef APPCONF_BALANCE_USE_SWITCHES
#define APPCONF_BALANCE_USE_SWITCHES false
#ifndef APPCONF_BALANCE_ADC1
#define APPCONF_BALANCE_ADC1 0.0
#endif
#ifndef APPCONF_BALANCE_ADC2
#define APPCONF_BALANCE_ADC2 0.0
#endif
#ifndef APPCONF_BALANCE_OVERSPEED_DUTY
#define APPCONF_BALANCE_OVERSPEED_DUTY 0.9
Expand Down Expand Up @@ -325,6 +328,33 @@
#ifndef APPCONF_BALANCE_CURRENT_BOOST
#define APPCONF_BALANCE_CURRENT_BOOST 0.0
#endif
#ifndef APPCONF_BALANCE_MULTI_ESC
#define APPCONF_BALANCE_MULTI_ESC false
#endif
#ifndef APPCONF_BALANCE_YAW_KP
#define APPCONF_BALANCE_YAW_KP 0.0
#endif
#ifndef APPCONF_BALANCE_YAW_KI
#define APPCONF_BALANCE_YAW_KI 0.0
#endif
#ifndef APPCONF_BALANCE_YAW_KD
#define APPCONF_BALANCE_YAW_KD 0.0
#endif
#ifndef APPCONF_BALANCE_ROLL_STEER_KP
#define APPCONF_BALANCE_ROLL_STEER_KP 0.0
#endif
#ifndef APPCONF_BALANCE_BRAKE_CURRENT
#define APPCONF_BALANCE_BRAKE_CURRENT 0.0
#endif
#ifndef APPCONF_BALANCE_OVERSPEED_DELAY
#define APPCONF_BALANCE_OVERSPEED_DELAY 0
#endif
#ifndef APPCONF_BALANCE_FAULT_DELAY
#define APPCONF_BALANCE_FAULT_DELAY 0
#endif
#ifndef APPCONF_BALANCE_TILTBACK_CONSTANT
#define APPCONF_BALANCE_TILTBACK_CONSTANT 0.0
#endif

// IMU
#ifndef APPCONF_IMU_TYPE
Expand Down
4 changes: 3 additions & 1 deletion applications/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ uint32_t app_balance_get_diff_time(void);
float app_balance_get_motor_current(void);
float app_balance_get_motor_position(void);
uint16_t app_balance_get_state(void);
uint16_t app_balance_get_switch_value(void);
uint16_t app_balance_get_switch_state(void);
float app_balance_get_adc1(void);
float app_balance_get_adc2(void);

// Custom apps
void app_custom_start(void);
Expand Down
Loading

0 comments on commit 8ae52e8

Please sign in to comment.