Skip to content

Commit

Permalink
Added STR500_HP
Browse files Browse the repository at this point in the history
  • Loading branch information
vedderb committed Jul 15, 2024
1 parent a6390ab commit 68094e9
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 3 deletions.
15 changes: 12 additions & 3 deletions hwconf/trampa/str500/hw_str500_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#define HW_NAME "STR500"
#elif defined(HWSTR500_01) // 0.1 mOhm shunts
#define HW_NAME "STR500_01"
#elif defined(HWSTR500_HP)
#define HW_NAME "STR500_HP"
#else
#error "Must define hardware type"
#endif
Expand Down Expand Up @@ -113,25 +115,32 @@
#define ADC_IND_CURR1 0
#define ADC_IND_CURR2 1
#define ADC_IND_CURR3 2
#define ADC_IND_EXT5 11
#define ADC_IND_EXT 6
#define ADC_IND_EXT2 7
#define ADC_IND_SHUTDOWN 10
#define ADC_IND_EXT3 8
#define ADC_IND_EXT6 9
#define ADC_IND_VREFINT 12
#define ADC_IND_ADC_MUX 15
#define ADC_IND_EXT4 16

#define ADC_IND_TEMP_MOTOR 18
#define ADC_IND_VIN_SENS 19
#define ADC_IND_TEMP_MOS 20
#define ADC_IND_TEMP_MOS_2 21
#define ADC_IND_NC 22
#define ADC_IND_EXT8 23
#define ADC_IND_EXT7 24
#define ADC_IND_TEMP_MOS_3 25

#ifdef HWSTR500_HP
#define ADC_IND_EXT5 9
#define ADC_IND_EXT6 19
#define ADC_IND_VIN_SENS 11
#else
#define ADC_IND_EXT5 11
#define ADC_IND_EXT6 9
#define ADC_IND_VIN_SENS 19
#endif

// ADC macros and settings

// Component parameters (can be overridden)
Expand Down
27 changes: 27 additions & 0 deletions hwconf/trampa/str500/hw_str500_hp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2018 Benjamin Vedder [email protected]
This file is part of the VESC firmware.
The VESC firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The VESC firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef HW_STR500_HP_H_
#define HW_STR500_HP_H_

#define HWSTR500_HP

#include "hw_str500_core.h"

#endif /* HW_STR500_HP_H_ */
28 changes: 28 additions & 0 deletions hwconf/trampa/str500/hw_str500_hp_no_limits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright 2018 Benjamin Vedder [email protected]
This file is part of the VESC firmware.
The VESC firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The VESC firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef HW_STR500_HP_NO_LIMITS_H_
#define HW_STR500_HP_NO_LIMITS_H_

#define HWSTR500_HP
#define DISABLE_HW_LIMITS

#include "hw_str500_core.h"

#endif /* HW_STR500_HP_NO_LIMITS_H_ */
2 changes: 2 additions & 0 deletions package_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def get_git_revision_short_hash() -> str:
package_dict["STR500"] = [['str500', default_name],
['str500_no_limits', no_limits_name]]
package_dict["STR500_01"] = [['str500_01', default_name]]
package_dict["STR500_HP"] = [['str500_hp', default_name],
['str500_hp_no_limits', no_limits_name]]
package_dict["RB"] = [['rb', default_name]]
package_dict["STR365"] = [['str365', default_name],
['str365_no_limits', no_limits_name]]
Expand Down

0 comments on commit 68094e9

Please sign in to comment.